@meteor-it/fs

Wrappers for native fs module

Stats

stars 🌟issues ⚠️updated 🛠created 🐣size 🏋️‍♀️
@meteor-it/fs
Minified + gzip package size for @meteor-it/fs in KB

Readme

FS

Wrapper around node.js native fs library. Have same methods as fs, but promisified

Addictional methods

walkDir(dir, cb)

Asynchonously walks directory. Returns file list when done, cb is called when any directory was discovered

let filesAwaited = [];
let filesCont = [];
filesAwaited = await walkDir(__dirname, (file)=>{
    filesCont.push(file);
});

// filesAwaited will be same as filesCont

exists(file)

Returns true if file exists

isFile(file)

Returns true if 'file' is file

isDirectory(file)

Returns true if 'file' is directory

getReadStream/getWriteStream

Same as fs.createReadStream/fs.createWriteStream

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.