pruneold
v1.0.1
Published
Prune old files if the total size grows too much
Downloads
7
Readme
pruneold
Prune old files from a directory so that the folder maintains a max size. This is useful to implement a file system cache
var pruneold = require('pruneold')
pruneold(
'/path/to/a/folder',
10 * 1024, // max size in bytes
function (err) {
// this will called after the pruning
})
Acknowledgements
This project was kindly sponsored by nearForm.
License
MIT