fs-extra-enhancer
v1.0.4
Published
`fs-extra-enhancer` is for enhancing `fs-extra`.
Downloads
3
Readme
what is fs-extra-enhancer
fs-extra-enhancer
is for enhancing fs-extra
.
const fsee = require('fs-extra-enhancer');
how to use
async
fsee.emptyDir(dir[, filter], callback)
filter
is added forfse.emptyDir(dir, callback)
.Sometimes we don't want to empty all files in dir to avoid errors like
EACCESS
, then we can use this function.example:
fsee.emptyDir(dir, { ignored: /\.DS_Store/ }, function(err) { if (err) { throw err; } console.log('done'); })
It won't remove
.DS_Store
when empty dir, which won't causeEACCESS
errors whenemptyDir
tried to remove files like.idea/.DS_Store/...
(sudo
is needed).others
same as
fs-extra
.
sync
fsee.emptyDirSync(dir[, filter])
others
same as
fs-extra
.