Current Path: > > lib > node_modules > npm > node_modules > fs-vacuum
Operation : Linux premium131.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64 Software : Apache Server IP : 162.0.232.56 | Your IP: 216.73.216.111 Domains : 1034 Domain(s) Permission : [ 0755 ]
Name | Type | Size | Last Modified | Actions |
---|---|---|---|---|
.eslintrc | File | 421 bytes | March 10 2021 14:36:39. | |
.npmignore | File | 13 bytes | March 10 2021 14:36:39. | |
.travis.yml | File | 215 bytes | March 10 2021 14:36:39. | |
LICENSE | File | 736 bytes | March 10 2021 14:36:39. | |
README.md | File | 1214 bytes | March 10 2021 14:36:39. | |
package.json | File | 1560 bytes | March 10 2021 14:36:39. | |
vacuum.js | File | 3302 bytes | March 10 2021 14:36:39. |
# fs-vacuum Remove the empty branches of a directory tree, optionally up to (but not including) a specified base directory. Optionally nukes the leaf directory. ## Usage ```javascript var logger = require("npmlog"); var vacuum = require("fs-vacuum"); var options = { base : "/path/to/my/tree/root", purge : true, log : logger.silly.bind(logger, "myCleanup") }; /* Assuming there are no other files or directories in "out", "to", or "my", * the final path will just be "/path/to/my/tree/root". */ vacuum("/path/to/my/tree/root/out/to/my/files", options, function (error) { if (error) console.error("Unable to cleanly vacuum:", error.message); }); ``` # vacuum(directory, options, callback) * `directory` {String} Leaf node to remove. **Must be a directory, symlink, or file.** * `options` {Object} * `base` {String} No directories at or above this level of the filesystem will be removed. * `purge` {Boolean} If set, nuke the whole leaf directory, including its contents. * `log` {Function} A logging function that takes `npmlog`-compatible argument lists. * `callback` {Function} Function to call once vacuuming is complete. * `error` {Error} What went wrong along the way, if anything.
SILENT KILLER Tool