Usage (node)
npm install extended-fs
Extended functionality of fs with additional q-dependent promises adaptation of fs functions.
Utilizes the q
, mkdirp
, and graceful-fs
to implement missing features and augment existing functions.
Acts as a replacement fs for the existing fs, as it copies over existing functionality from fs. In addition to the standard functions available on node's package fs
, this includes functions to support copying and removing directories recursively. Leverages the q
package to introduce promise driven fs
methods.
Asynchronous recursive directory walk. Operation is performed on each file and provided a signature with the filepath and stats for the triggered file operation(filepath, operation)
. If the supplied operation
returns false
, the recursion for that branch will stop. No arguments other than a possible error are given to the callback.
Synchronous recursive directory walk.
Asynchronous recursive directory removal. No arguments other than a possible error are given to the callback.
Synchronous recursive directory removal.
Asynchronous file copy. Copies the file found at src
over to the dest
path, overwriting dest
. No arguments other than a possible error are given to the callback.
Synchronous file copy.
Asynchronous recursive directory copy. Copies all files found at the src
directory, removing dest
before writing. No arguments other than a possible error are given to the callback.
Synchronous recursive directory copy.
See mkdirp.
See mkdirp.sync.