# verify-path

> promise verifing path (creating directory if it doesn't exist)

Latest version **1.0.3** (published 2015-12-31) · ISC license · 0 weekly downloads

## Install

```sh
npm install verify-path
pnpm add verify-path
yarn add verify-path
bun add verify-path
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2015-12-31 |
| First published | 2015-12-30 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=4.1.0 |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | https://github.com/indieforger |
| Maintainers | indieforger |
| Keywords | dir, path, verify |

## Links

- npm: https://www.npmjs.com/package/verify-path
- Repository: https://github.com/indieforger/verify-path
- Homepage: https://github.com/indieforger/verify-path#readme
- Issues: https://github.com/indieforger/verify-path/issues
- npm.io page: https://npm.io/package/verify-path

## Alternatives

- [base64url](https://npm.io/package/base64url.md) — 6.1M weekly downloads
- [get-installed-path](https://npm.io/package/get-installed-path.md) — 502.9K weekly downloads
- [@uppy/url](https://npm.io/package/@uppy/url.md) — 185.8K weekly downloads
- [@d3fc/d3fc-shape](https://npm.io/package/@d3fc/d3fc-shape.md) — 16.2K weekly downloads
- [localizer](https://npm.io/package/localizer.md) — 226 weekly downloads

## Recent versions

- 1.0.3 (latest) — 2015-12-31
- 1.0.2 — 2015-12-30
- 1.0.1 — 2015-12-30
- 1.0.0 — 2015-12-30

## README

# Verify Path

## Path verification method

`verifyPath(settings)` method verifies directory path.
If directory doesn't exist it will be created.
It returns [ES6 promise](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Promise) object
and resolves it upon directory confirmation or it's successful creation.

You can pass `settings` object which will be decorated with 'fullPath' property and passed as a parameter into returned promise `resolve()` method.

## Usage

### Installation
```
npm install verify-path --save
```

### Require
```
var verifyPath = require('verifyPath');
```

### Usage examples

#### Verify current path

If no parameters are passed, current directory will be verified.

```
verifyPath().then((obj) => {
    console.log('success: ', obj)
}, (err) => {
    console.log('err: ', err)
})
```

#### Create directory with custom privileges

Custom `./temp` sub-directory will be created with `0700` mode.

```
verifyPath({
    path: './tmp',
    mode: parseInt('0700', 8)
}).then((obj) => {
    console.log('success: ', obj)
}, (err) => {
    console.log('err: ', err)
})
```

Default mode is `0755`

---
_Source: https://npm.io/package/verify-path · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
