This package has been deprecated

Author message:

This package is no longer relevant as Node.js 0.12 is unmaintained.

fs-access

2.0.0 • Public • Published

Deprecated

This package is no longer relevant as Node.js 0.12 is unmaintained.


fs-access Build Status

Node.js 0.12 fs.access() & fs.accessSync() ponyfill

Install

$ npm install --save fs-access

Usage

var fsAccess = require('fs-access');
 
fsAccess('unicorn.txt', function (err) {
    if (err) {
        console.error('no access');
        return;
    }
 
    console.log('access');
});
var fsAccess = require('fs-access');
 
try {
    fsAccess.sync('unicorn.txt');
    console.log('access');
} catch (err) {
    console.error('no access');
}

API

See the fs.access() & fs.accessSync() docs.

Mode flags are on the fsAccess instance instead of fs. Only the F_OK mode is supported.

License

MIT © Sindre Sorhus

Package Sidebar

Install

npm i fs-access

Weekly Downloads

341,027

Version

2.0.0

License

MIT

Unpacked Size

3.7 kB

Total Files

4

Last publish

Collaborators

  • sindresorhus