pruneold

1.0.1 • Public • Published

pruneold  Build Status

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

Readme

Keywords

Package Sidebar

Install

npm i pruneold

Weekly Downloads

0

Version

1.0.1

License

MIT

Last publish

Collaborators

  • matteo.collina