Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
This package has been deprecated with the following message: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
Generated on Apr 13, 2024 via pnpm

graceful-fs 1.1.14

fs monkey-patching to avoid EMFILE and other problems
Package summary
Share
3
issues
2
high severity
license
1
meta
1
1
low severity
license
1
1
license
1
BSD
Package created
20 Jul 2011
Version published
20 Sep 2012
Maintainers
1
Total deps
1
Direct deps
0
License
BSD

Issues

3

2 high severity issues

high
Recommendation: Validate that the package complies with your license policy
via: graceful-fs@1.1.14
via: graceful-fs@1.1.14
Collapse
Expand

1 low severity issue

low
Recommendation: Read and validate the license terms
via: graceful-fs@1.1.14
Collapse
Expand

Licenses

BSD

Invalid
Not OSI Approved
1 Packages, Including:
graceful-fs@1.1.14
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

0
All Dependencies CSV
β“˜ This is a list of graceful-fs 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does graceful-fs do?

Graceful-fs is a comprehensive software package designed to function as a drop-in replacement for the fs module, or file system module, found in Node.js. It embodies various enhancements that are aimed to standardize the behavior across different operating systems and environments, as well as increase the resilience to errors in file system access. This includes measures like queuing up 'open' and 'readdir' calls, retrying them once something closes if there's an EMFILE error from too many file descriptors, and implementing fs.lutimes if possible. On Windows, it retries renaming a file for up to one second if the 'EACCESS' or 'EPERM' error occurs. This may be because antivirus software has temporarily locked the directory.

How do you use graceful-fs?

Using Graceful-fs is very straightforward. It can be installed using npm and then used just like you would use the fs module. Here's an example of how you might utilize it:

// Using Graceful-fs  
var fs = require('graceful-fs'); 
// Use it to read a file 
fs.readFile('some-file-or-whatever', (err, data) => {
  // Process the file here.
})

In certain instances, you might want to patch the global fs module. Here's an example of how to handle that:

// Global fs module patching
var realFs = require('fs');
var gracefulFs = require('graceful-fs');
gracefulFs.gracefulify(realFs);

However, it's crucial to remember that patching should only be performed at the top-level application layer to avoid unexpected delays in other parts of the program.

Where are the graceful-fs docs?

The documentation and additional information for Graceful-fs can be found in the README file in the repository on GitHub. It's located at git+https://github.com/isaacs/node-graceful-fs.git. This documentation outlines the specific improvements that Graceful-fs provides over the standard fs module, gives usage examples, details about global patching, and a variety of other pertinent resources and information. Users familiar with fs module can quickly adapt to the use of Graceful-fs, thanks to the comprehensive information and examples provided in the documentation.