Socket
Socket
Sign inDemoInstall

stubborn-fs

Package Overview
Dependencies
0
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    stubborn-fs

Stubborn versions of Node's fs functions that try really hard to do their job.


Version published
Weekly downloads
201K
increased by3.15%
Maintainers
1
Install size
23.0 kB
Created
Weekly downloads
 

Readme

Source

Stubborn FS

Stubborn versions of Node's fs functions that try really hard to do their job.

Install

npm install --save stubborn-fs

Usage

The following functions are currently provided, if you need others please open an issue.

  • attempt functions swallow some errors that may occur.
  • retry functions are executed in a loop until they succeed or the timeout is reached, in which case an error is thrown.
import fs from 'stubborn-fs';

// Attempt functions (async)

fs.attempt.chmod;
fs.attempt.chown;
fs.attempt.close;
fs.attempt.fsync;
fs.attempt.mkdir;
fs.attempt.realpath;
fs.attempt.stat;
fs.attempt.unlink;

// Attempt functions (sync)

fs.attempt.chmodSync;
fs.attempt.chownSync;
fs.attempt.closeSync;
fs.attempt.existsSync;
fs.attempt.fsyncSync;
fs.attempt.mkdirSync;
fs.attempt.realpathSync;
fs.attempt.statSync;
fs.attempt.unlinkSync;

// Retry functions (async)

fs.retry.close;
fs.retry.fsync;
fs.retry.open;
fs.retry.readFile;
fs.retry.rename;
fs.retry.stat;
fs.retry.write;
fs.retry.writeFile;

// Retry functions (sync)

fs.retry.closeSync;
fs.retry.fsyncSync;
fs.retry.openSync;
fs.retry.readFileSync;
fs.retry.renameSync;
fs.retry.statSync;
fs.retry.writeSync;
fs.retry.writeFileSync;

License

MIT © Fabio Spampinato

Keywords

FAQs

Last updated on 26 Jul 2023

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc