The filewalker-module for node is designed to provide maximum
reliance paired with maximum throughput/performance and the
ability to throttle that throughput/performance.
npm install filewalker
$ npm test
Simple directory listing and disk-usage report:
var filewalker = ;;
Calculate md5-hash for every file:
var started = Date;var createHash = createHashfilewalker = ;var options =maxPending: 10 // throttle handles;;
Inherits from node-fqueue
maxPending (default: -1)
Maximum asynchronous jobs.
Useful to throttle the number of simultaneous disk-operations.
maxAttempts (default: 3)
Maximum reattempts on error.
Set to 0 to disable reattempts.
Set to -1 for infinite reattempts.
attemptTimeout (default: 5000 ms)
Minimum time to wait before reattempt. In milliseconds.
Useful to let network-drives remount, etc.
matchRegExp (default: null)
A RegExp-instance the path to a file must match in order to
emit a "file" event. Set to
null to emit all paths.
recursive (default: true)
Traverse in a recursive manner.
In case you wish to target only the current directory,
Notice: There will be no fs.ReadStream created if no listener
listens to the 'stream'-event.
Copyright (c) Oliver Leics firstname.lastname@example.org
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.