file-backup
Makes rotating [file].0, [file].1 ... backups in the same directory (node.js)
Promise
file_backup(file, levels, [callback]) ⇒ Makes rotating [file].0, [file].1 ... backups in the same directory
Kind: global function
Returns: Promise
- Resolves on success, rejects on some fs-level error
Param | Type | Description |
---|---|---|
file | string |
The path to the file to back up |
levels | number |
The number of backups to keep |
[callback] | function |
Standard error-first, if that's how you roll |