dir-equals
check if two directories are the same, with support for custom fs
Currently checks:
- total file count
- total size
- total directory count
Warning: Could have false positives if all the above are the same.
Install
npm install dir-equals
Usage
var compare =
API
compare(dir1, dir2, [opts], cb)
The dir
variables are either paths or {name, fs}
for custom fs.
Use custom fs:
var dir1 = fs: customFs name: '/'
TODO:
- Add options for more in depth checks
- Check file names
- Check fs.stat results
- Check file contents