Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

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