fs helper utilities (walk, copy, remove, mkdir -p)
JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
lib lint rules & files update Jan 8, 2014
support/sandbox-template
test
.gitignore
.jshintignore Fix dev-scripts Feb 5, 2012
.jshintrc lint rules & files update Jan 8, 2014
.ndocrc Update make doc & make publish Jul 8, 2012
.travis.yml travis config update Jan 8, 2014
HISTORY.md 0.2.11 released Jan 8, 2014
LICENSE improved packaged description Nov 24, 2011
Makefile Add walkSync() Jan 8, 2013
README.md fixed docs Mar 18, 2013
index.js lint rules & files update Jan 8, 2014
package.json 0.2.11 released Jan 8, 2014

README.md

fs-tools

Build Status

Useful file utitiles. See API Documentation for detailed info.


walk(path, [pattern,] iterator[, callback])

Recurcively scan files by regex pattern & apply iterator to each. Iterator applied only to files, not to directories. If given path is a file, iterator will be called against it (if pattern allows it).

walkSync(path, [pattern,] iterator)

Sync version of walk(). Throws exception on error.

findSorted(path, [pattern,] callback)

Recursively collects files by regex pattern (if given, all files otherwise).

remove(path, callback)

Recursively delete directory with all content.

removeSync(path)

Sync version of remove(). Throws exception on error.

mkdir(path, mode = '0755', callback)

Recursively make path.

mkdirSync(path, mode = '0755')

Sync version of mkdir(). Throws exception on error.

copy(src, dst, callback)

Copy file.

move(src, dst, callback)

Move file.

tmpdir([template])

Returns unique directory (at the moment of request) pathbname.

License

View the LICENSE file (MIT).