New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

verify-path

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

verify-path

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

latest
Source
npmnpm
Version
1.0.3
Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

Verify Path

Path verification method

verifyPath(settings) method verifies directory path. If directory doesn't exist it will be created. It returns ES6 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

Keywords

dir

FAQs

Package last updated on 31 Dec 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts