Extension for Node.js fs module
Table of Contents:
- getDirs(path, cb)
- getDirsSync(path)
- isEmpty(path, cb)
- isEmptySync(path)
- remove(path, cb)
- removeSync(path)
getDirs(path, cb)
Get all directories from a path
Example:
var fs = ; fs;
getDirsSync(path)
(Synchronously) Get all directories from a path
Example:
var fs = ; var dirs = fs;console; // Array of directories
isEmpty(path, cb)
Check if a file or directory is empty. A file is empty if not exists or not have any content. A directory is empty if not exists or not have any file inside.
Example:
var fs = ; fs;
isEmptySync(path)
(Synchronously) Check if a file or directory is empty. A file is empty if not exists or not have any content. A directory is empty if not exists or not have any file inside.
Example:
var fs = ; var empty = fs;console;
remove(path, cb)
Remove a path or array of paths. A path can be a file or directory. If a directory is not empty, also removes its content.
Example:
var fs = ; fs;fs;
removeSync(path, cb)
(Synchronously) Remove a path or array of paths. A path can be a file or directory. If a directory is not empty, also removes its content.
Example:
var fs = ; fs;fs;