
Product
Introducing Tier 1 Reachability: Precision CVE Triage for Enterprise Teams
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
Module that add methods and patches to node fs module
enfs stands for [E]asy [N]ode [fs]
This module will add many methods to node fs module. This is just the main module that will join many modules of the family of enfs, making it easier to use many of the methods present in each module.
emptyDir
emptyDirSync
enfs
is a drop-in replacement for native fs
module, you just need to include
it instead of the native module.
Use this
var enfs = require("enfs");
instead of
var fs = require("fs"); //You don't need to do this anymore
and all the methods from native fs module are available
All the methods follows the node culture.
Remove all items from the directory this method use rimraf, then you can pass wildcards to the path like you do in rimraf
enfs.emptyDir("/path/to/empty/*", function(err){
if(!err) {
console.log("Directory is empty");
}
});
Remove all items from the directory this method use rimraf.sync, then you can pass wildcards to the path like you do in rimraf
enfs.emptyDirSync("/path/to/empty/*");
console.log("Directory is empty");
enfs.exists
enfs.existsSync
enfs.existAccess
enfs.existAccessSync
enfs.existStat
enfs.existLStat
enfs.existFStat
enfs.existStatSync
enfs.existLStatSync
enfs.existFStatSync
enfs.mkdirp
enfs.mkdirpSync
enfs.ensureFile
enfs.ensureFileSync
enfs.ensureDir
enfs.ensureDirSync
enfs.ensureLink
enfs.ensureLinkSync
enfs.ensureSymlink
enfs.ensureSymlinkSync
enfs.compareFiles
enfs.compareFilesSync
enfs.compareFilesHash
enfs.compareFilesHashSync
enfs.compareDir
enfs.compareDirSync
enfs.compareDirHash
enfs.compareDirHashSync
Creative Commons Attribution 4.0 International License
Copyright (c) 2016 Joao Parreira joaofrparreira@gmail.com GitHub
This work is licensed under the Creative Commons Attribution 4.0 International License. To view a copy of this license, visit CC-BY-4.0.
FAQs
Extras suite for node fs module
We found that enfs demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
Research
/Security News
Ongoing npm supply chain attack spreads to DuckDB: multiple packages compromised with the same wallet-drainer malware.
Security News
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.