fs-read-queue
Queue
fs.readFile
calls to the same file path.
The code in this module is inspired by the work done by mhiguera in this pull request.
Install with npm
$ npm i fs-read-queue --save
Usage
var readFile = ;
API
readFile
File reading function that will queue up calls to fs.readFile
for the same filepath to prevent ENFILE
errors.
Params
fp
{String}: File path to readoptions
{String}: Additional options to pass tofs.readFile
cb
{Function}: Callback function that takeserr
andcontents
parameters. Will be called when the file is read.
Example
;
Running tests
Install dev dependencies:
$ npm i -d && npm test
Contributing
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue
Author
Brian Woodward
License
Copyright © 2015 Brian Woodward Released under the MIT license.
This file was generated by verb-cli on July 01, 2015.