0.1.7 • Published 10 years ago

cache-file v0.1.7

Weekly downloads
3
License
MIT
Repository
github
Last release
10 years ago

Store and get files from cache with Node.js.

Getting started

Install with npm: npm install cache-file

Examples

var cache = require('cache-file');

// store test.jpg inside a test folder in cache
cache.store('test.jpg');

// get test.jpg from cache and save it as test-restored.jpg
cache.get('test.jpg', 'test-restored.jpg');

// check if test.jpg exists in cache
cache.check('test.jpg');

// get the path to test.jpg in cache
cache.path('test.jpg');

// remove test.jpg from cache
cache.clean('test.jpg');

API

.store(src, dest)

Store a file inside cache. Use dest to specify a custom name.

.get(src, dest)

Get a cached file and save it to a desired location.

.check(src)

Check if a cached file exists.

.path(src)

Get the path to a cached file.

.clean(src)

Remove a file from cache.

License

MIT License (c) Kevin Mårtensson

0.1.7

10 years ago

0.1.6

10 years ago

0.1.5

10 years ago

0.1.4

10 years ago

0.1.3

10 years ago

0.1.2

10 years ago

0.1.1

11 years ago

0.1.0

11 years ago