Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(graceful-fs): added to solve issues with too many open files
- Loading branch information
Showing
5 changed files
with
62 additions
and
25 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,11 @@ | ||
import fs from 'fs'; | ||
import { promisify } from 'util'; | ||
import * as gracefulFs from 'graceful-fs'; | ||
|
||
export const readFileAsync = promisify(fs.readFile); | ||
export const readdirAsync = promisify(fs.readdir); | ||
export const statAsync = promisify(fs.stat); | ||
export const readdirAsync = promisify(gracefulFs.readdir); | ||
export const statAsync = promisify(gracefulFs.stat); | ||
export const safeCreateReadStream = gracefulFs.createReadStream; | ||
export const safeCreateWriteStream = gracefulFs.createWriteStream; | ||
export const safeExistsSync = gracefulFs.existsSync; | ||
export const safeMkdirSync = gracefulFs.mkdirSync; | ||
export const safeReadFileSync = gracefulFs.readFileSync; | ||
export const safeStatSync = gracefulFs.statSync; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters