# fs-access

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

Latest version **2.0.0** (published 2018-11-08) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install fs-access
pnpm add fs-access
yarn add fs-access
bun add fs-access
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2018-11-08 |
| First published | 2015-05-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.10.0 |
| Dependencies | 1 |
| Unpacked size | 3.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 13 |
| Author | Sindre Sorhus |
| Maintainers | sindresorhus |
| Keywords | built-in, core, ponyfill, polyfill, shim, fs, access, stat, mode, permission, user, process, check |

## Links

- npm: https://www.npmjs.com/package/fs-access
- Repository: https://github.com/sindresorhus/fs-access
- Homepage: https://github.com/sindresorhus/fs-access#readme
- Issues: https://github.com/sindresorhus/fs-access/issues
- npm.io page: https://npm.io/package/fs-access

## Dependencies (1)

- [null-check](https://npm.io/package/null-check.md) ^1.0.0

## Alternatives

- [unionfs](https://npm.io/package/unionfs.md) — 2.2M weekly downloads
- [path-starts-with](https://npm.io/package/path-starts-with.md) — 35.9K weekly downloads
- [redzip](https://npm.io/package/redzip.md) — 1.2K weekly downloads
- [vscode-anymatch](https://npm.io/package/vscode-anymatch.md) — 848 weekly downloads
- [@ledgerhq/coin-filecoin](https://npm.io/package/@ledgerhq/coin-filecoin.md) — 793 weekly downloads

## Recent versions

- 2.0.0 (latest) — 2018-11-08
- 1.0.1 — 2016-09-30
- 1.0.0 — 2015-05-10

## README

# Deprecated

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

---

# fs-access [![Build Status](https://travis-ci.org/sindresorhus/fs-access.svg?branch=master)](https://travis-ci.org/sindresorhus/fs-access)

> Node.js 0.12 [`fs.access()`](https://nodejs.org/api/fs.html#fs_fs_access_path_mode_callback) & [`fs.accessSync()`](https://nodejs.org/api/fs.html#fs_fs_accesssync_path_mode) [ponyfill](https://ponyfill.com)


## Install

```
$ npm install --save fs-access
```


## Usage

```js
var fsAccess = require('fs-access');

fsAccess('unicorn.txt', function (err) {
	if (err) {
		console.error('no access');
		return;
	}

	console.log('access');
});
```

```js
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](https://nodejs.org/api/fs.html#fs_fs_access_path_mode_callback).

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


## License

MIT © [Sindre Sorhus](http://sindresorhus.com)

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