Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

fs-tools

Trott4.9kMITdeprecated0.5.0

Use shelljs, glob, mkdirp, rimraf, or other alternatives

fs helper utilities (walk, copy, mkdir -p)

fs, file, utils

readme

fs-tools

Build Status

Some file utilities. See API Documentation for detailed info.

This project is not maintained anymore because now actual and better alternatives are available.

Consider using another package:


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

Recursively 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) pathname.

License

MIT

changelog

0.3.0 / 2016-09-29

  • Added notice that project is not maintained as not actual.
  • Removed testing in node 0.8, added testing in node 0.12, 4, 6.

0.2.11 / 2014-01-08

  • Maintenance release.

0.2.10 / 2013-03-15

  • Fixed possible callback duplication, if error happens on internal file copy

0.2.9 / 2013-02-17

  • Better tmpdir support - shoud be ok on Win for node 0.8+

0.2.8 / 2013-01-08

  • Added FsTools.walkSync()

0.2.7 / 2012-12-19

  • Added FsTools.mkdirSync()

0.2.6 / 2012-10-15

  • Added FsTools.findSorted()

0.2.5 / 2012-08-21

  • Allows call FsTools.walk() with pathname pointing file.

0.2.4 / 2012-08-19

  • Added FsTools.move()
  • Added FsTools.tmpdir()

0.2.3 / 2012-08-09

  • Added FsTools.removeSync() method

0.2.2 / 2012-02-26

  • Update API to be 0.8 compatible with shims for 0.6

0.2.1 / 2012-02-09

  • Really fixed bug #16 with copying over existing dir + added test

0.2.0 / 2012-02-08

  • Fixed bug with fstools.copy() dst directory creation.
  • Simplified code.

0.1.1 / 2012-02-06

  • Use async instead of simple-promise

0.1.0 / 2011-11-24

  • First public release