graceful-fs
Advanced tools
Comparing version 4.1.2 to 4.1.3
@@ -36,2 +36,3 @@ var fs = require('fs') | ||
// in play at the same time. | ||
module.exports.close = | ||
fs.close = (function (fs$close) { return function (fd, cb) { | ||
@@ -47,2 +48,3 @@ return fs$close.call(fs, fd, function (err) { | ||
module.exports.closeSync = | ||
fs.closeSync = (function (fs$closeSync) { return function (fd) { | ||
@@ -49,0 +51,0 @@ // Note that graceful-fs also retries when fs.closeSync() fails. |
{ | ||
"name": "graceful-fs", | ||
"description": "A drop-in replacement for fs, making various improvements.", | ||
"version": "4.1.2", | ||
"version": "4.1.3", | ||
"repository": { | ||
@@ -39,3 +39,3 @@ "type": "git", | ||
"rimraf": "^2.2.8", | ||
"tap": "^1.2.0" | ||
"tap": "^5.4.2" | ||
}, | ||
@@ -42,0 +42,0 @@ "files": [ |
@@ -37,1 +37,18 @@ # graceful-fs | ||
``` | ||
## Global Patching | ||
If you want to patch the global fs module (or any other fs-like | ||
module) you can do this: | ||
```javascript | ||
// Make sure to read the caveat below. | ||
var realFs = require('fs') | ||
var gracefulFs = require('graceful-fs') | ||
gracefulFs.gracefulify(realFs) | ||
``` | ||
This should only ever be done at the top-level application layer, in | ||
order to delay on EMFILE errors from any fs-using dependencies. You | ||
should **not** do this in a library, because it can cause unexpected | ||
delays in other parts of the program. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
19733
547
54