Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mcollina/pruneold
Prune old files from a directory so that the folder maintains a max size.
https://github.com/mcollina/pruneold
Last synced: 28 days ago
JSON representation
Prune old files from a directory so that the folder maintains a max size.
- Host: GitHub
- URL: https://github.com/mcollina/pruneold
- Owner: mcollina
- License: mit
- Created: 2015-06-12T13:44:06.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-06-15T09:43:41.000Z (over 9 years ago)
- Last Synced: 2024-12-17T15:42:34.261Z (about 1 month ago)
- Language: JavaScript
- Homepage:
- Size: 133 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pruneold [![Build Status](https://travis-ci.org/mcollina/pruneold.png)](https://travis-ci.org/mcollina/pruneold)
Prune old files from a directory so that the folder maintains a max
size.
This is useful to implement a file system cache```js
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](http://nearform.com).
## License
MIT