0.11.0 • Published 8 years ago

tool.fs v0.11.0

Weekly downloads
2
License
Unlicense
Repository
github
Last release
8 years ago

tool.fs

A lean collection of node utilities focused on the fs module

Syntax

var toolfs = require("tool.fs")

, 	dirStruct = {
		"root": {
			"first": "",
			"second": {
				"child1": {
					"grandchild1": "",
					"etc": "andSoOn"
				}
			}
		}
	}

toolfs.mkdirp("some/recursive/directories", callback)
toolfs.mkdirTree(dirStruct, callback)
toolfs.mkdirTreeSync(dirStruct)
toolfs.cpfile([{
	src: "/home/user/absolute/path",
	dest: "other/directory"
}, {
	src: "relative/path",
	dest: ""
}, {
	src: "./*.js",
	dest: "./levelDeeper"
}, {
	src: "**/glo??ing[pattern].js*",
	dest: "../"
}], callback)
toolfs.mklink("path/to/file/or/directory/to/link/to", "path/with/filename/where/link/will/reside"[, "soft" OR "hard"])
toolfs.clrdir("empty/this/directory", callback[, removeRoot<Boolean>])
  • cpfile uses minimatch to fulfill the globbing patterns
  • mklink will make a soft link (fs.symlink) by default. If passed "hard" but the file is a directory, will switch to "soft" internally.
  • clrdir will not follow symlinks. * pass true* as the optional third parameter if you'd like to also remove the directory itself after the contents have been recursively removed.
0.11.0

8 years ago

0.10.2

9 years ago

0.9.0

9 years ago

0.8.0

9 years ago

0.7.0

9 years ago

0.6.0

9 years ago

0.5.0

9 years ago

0.4.0

9 years ago

0.3.0

9 years ago

0.2.0-beta.2

9 years ago

0.2.0-beta.1

9 years ago

0.2.0-beta.0

9 years ago

0.1.0

9 years ago