path-mode
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

path-mode Travis CI Build Status

Check the permissions for a file path.

NPM Badge

Install

npm install path-mode

Usage

const {isWritable} = require("path-mode");

(async () => {
	console.log(await isWritable('package.json'));
	//=> true
})();

API

isReadable(path)

Check if a path is readable.

path

Type: string

The path to check.

Returns a Promise<boolean>.

isWritable(path)

Check if a path is writable.

Returns a Promise<boolean>.

isReadableSync(path)

Synchronously check if a path is readable.

Returns a boolean.

isWritableSync(path)

Synchronously check if a path is writable.

Returns a boolean.

Package Sidebar

Install

npm i path-mode

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

4.05 kB

Total Files

6

Last publish

Collaborators

  • richienb