jack e1a2621c78 update | před 2 roky | |
---|---|---|
.. | ||
lib | před 2 roky | |
tests | před 2 roky | |
.npmignore | před 2 roky | |
LICENSE | před 2 roky | |
README.md | před 2 roky | |
package.json | před 2 roky |
npm install file
var file = require("file");
Navigates a file tree, calling callback for each directory, passing in (null, dirPath, dirs, files).
Synchronus version of file.walk, calling callback for each directory, passing in (dirPath, dirs, files).
Makes all the directories in a path. (analgous to mkdir -P) For example given a path like "test/this/path" in an empty directory, mkdirs would make the directories "test", "this" and "path".
Like file.mkdirs but synchronous.
Expands ".", "..", "~" and non root paths to their full absolute path. Relative paths default to being children of the current working directory.
Given a root path, and a fullPath attempts to diff between the two to give us an acurate path relative to root.
Just like path.join but haves a little more sanely when give a head equal to "". file.path.join("", "tail") returns "tail", path.join("", "tail") returns "/tail"