
Product
Introducing Socket Firewall Enterprise: Flexible, Configurable Protection for Modern Package Ecosystems
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.
@absolunet/fsp
Advanced tools
graceful-fs / fs-extra promise wrapper with goodies
$ npm install @absolunet/fsp
const fsp = require('@absolunet/fsp');
fsp.chmodPattern('/path1/path2/**/*.js', 0o775).then(() => {
console.log('Yeah!');
});
fsis graceful-fs
fseis fs-extra
Maps fs.promises.access
Maps fs.promises.chmod
Applies fs.chmod for matching glob pattern file/dir.
Required
Type: String
glob pattern.
Required
Type: Number
File mode.
Type: Object
glob options.
Maps fs.promises.chown
Compresses file using gzip
Promise returns destination
Required
Type: String
Path of file to compress.
Type: String
Default: Same as source with a .gz added at the end
Path of file when compressed.
Maps fse.copy
Maps fs.promises.copyFile
Decompresses file using gzip
Promise returns destination
Required
Type: String
Path of file to decompress.
Type: String
Default: Same as source with the .gz removed at the end
Path of file when decompressed.
Maps fse.emptyDir
Maps fse.ensureDir
Maps fse.ensureFile
Maps fse.ensureLink
Maps fse.ensureSymlink
Maps fs.promises.lchmod
Maps fs.promises.lchown
Maps fs.promises.link
Maps fs.promises.lstat
Merge multiple files into a single file
Required
Type: Array of String
Path of files to merge.
Required
Type: String
Path of merged file. (If it ends with .gz it will be compressed using gzip)
Maps fs.promises.mkdir
Maps fse.mkdirp
Maps fse.mkdirs
Maps fs.promises.mkdtemp
Maps fse.move
Maps fs.promises.open
Almost the same as writeCompressed, except that if the directory does not exist, it's created.
Required
Type: String
Path of file to write.
Required
Type: String
Content to write.
Maps fse.outputFile
Almost the same as writeJson, except that if the directory does not exist, it's created.
Required
Type: String
Path of file to write. (If it ends with .gz it will be compressed using gzip)
Required
Type: Object
Object to write.
Type: Function
JSON.stringify replacer.
Type: String or Number
JSON.stringify space.
Almost the same as writeJson5, except that if the directory does not exist, it's created.
Required
Type: String
Path of file to write. (If it ends with .gz it will be compressed using gzip)
Required
Type: Object
Object to write.
Type: Function
JSON5.stringify replacer.
Type: String or Number
JSON5.stringify replacer.
Almost the same as writeXml, except that if the directory does not exist, it's created.
Required
Type: String
Path of file to write. (If it ends with .gz it will be compressed using gzip)
Required
Type: Object
Object to write.
Type: Object
xml2js.Builder().buildObject options.
Almost the same as writeYaml, except that if the directory does not exist, it's created.
Required
Type: String
Path of file to write. (If it ends with .gz it will be compressed using gzip)
Required
Type: Object
Object to write.
Maps fse.pathExists
Reads and decompresses file using gzip.
Promise returns an String
Required
Type: String
Path of file to read.
Maps fs.promises.readdir
Maps fs.promises.readFile
Reads a JSON file and then parses it into an object.
Promise returns an Object
Required
Type: String
Path of file to read. (If it ends with .gz it will be decompressed using gzip)
Type: Function
JSON.parse reviver.
Reads a JSON5 file and then parses it into an object.
Promise returns an Object
Required
Type: String
Path of file to read. (If it ends with .gz it will be decompressed using gzip)
Type: Function
JSON5.parse reviver.
Maps fs.promises.readlink
Reads a XML file and then parses it into an object.
Promise returns an Object
Required
Type: String
Path of file to read. (If it ends with .gz it will be decompressed using gzip)
Type: Object
xml2js.parseString options.
Reads a YAML file and then parses it into an object.
Promise returns an Object
Required
Type: String
Path of file to read. (If it ends with .gz it will be decompressed using gzip)
Maps fs.promises.realpath
Maps fse.remove
Uses delete-empty to recursively delete all empty folders in a directory and child directories
Promise returns an Array of deleted directories
Required
Type: String
Path of root directory to scan
Uses rimraf to delete files and directories via a globbing pattern
Required
Type: String
Globbing pattern
Maps fs.promises.rename
Maps fs.promises.rmdir
Uses klaw to scan directory for files or directories.
Return Array of files / directories
Required
Type: String
Path of directory to scan.
Required
Type: String
Scan for file or dir
Type: Boolean
Scan in subdirectories
Default: false
Type: String
Return full absolute path instead of relative path from scanned directory
Default: false
Type: String
Filter results with minimatch pattern
Default: '**'
Type: Boolean
Keep junk files (also filters out .gitkeep)
Default: false
Maps fs.promises.stat
Maps fs.promises.symlink
Maps fs.promises.truncate
Maps fs.promises.unlink
Maps fs.promises.utimes
Compresses and writes content to file using gzip.
Required
Type: String
Path of file to write.
Required
Type: String
Content to write.
Writes an object to a JSON file.
Required
Type: String
Path of file to write. (If it ends with .gz it will be compressed using gzip)
Required
Type: Object
Object to write.
Type: Function
JSON.stringify replacer.
Type: String or Number
JSON.stringify space.
Writes an object to a JSON5 file.
Required
Type: String
Path of file to write. (If it ends with .gz it will be compressed using gzip)
Required
Type: Object
Object to write.
Type: Function
JSON5.stringify replacer.
Type: String or Number
JSON5.stringify replacer.
Writes an object to a XML file.
Required
Type: String
Path of file to write. (If it ends with .gz it will be compressed using gzip)
Required
Type: Object
Object to write.
Type: Object
xml2js.Builder().buildObject options.
Writes an object to a YAML file.
Required
Type: String
Path of file to write. (If it ends with .gz it will be compressed using gzip)
Required
Type: Object
Object to write.
MIT © Absolunet
FAQs
graceful-fs / fs-extra promise wrapper with goodies
We found that @absolunet/fsp demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.

Security News
Open source dashboard CNAPulse tracks CVE Numbering Authorities’ publishing activity, highlighting trends and transparency across the CVE ecosystem.

Product
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.