Nicer FS
Nicer fs is a collection of common file system function brought to the age of
promises. Main differences compared to fs-extra
is that nicer-fs
is lighter.
API
-
find
- find file by glob pattern -
readFile
- promisifiedfs.readFile
-
writeFile
- promisifiedfs.writeFile
-
readJson
- safely read json files -
writeJson
- safely write json files -
readDir
- promisifiedfs.readDir
-
mkdir
- same asmkdir -p
-
copy
- same ascp [source] [target]
, works for files and folders -
remove
- same asrm -rf myfile myfolder
-
exists
- check if a file or folder exists -
replaceExtension
- easily replace a file extension -
getCallerFileName
- get the name of the file a function is called in