gettemporaryfilepath
Generate temporary file names in your OS' temporary dir
Last updated 3 years ago by papandreou .
BSD · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install gettemporaryfilepath 
SYNC missed versions from official npm registry.

node-gettemporaryfilepath

Generate file names for temporary files:

var getTemporaryFilePath = require('gettemporaryfilepath');

getTemporaryFilePath(); // "/tmp/112116-2662-18u8bl8"
getTemporaryFilePath(); // "/tmp/112116-2662-1inp07r"

Creating and cleaning up the temporary files is your own responsibility.

Custom suffixes and prefixes are supported using the same syntax as node-temp (from which most of the code was taken):

getTemporaryFilePath({suffix: '.png'}); // "/tmp/112116-2662-125a83d.png"
getTemporaryFilePath({prefix: 'foo-'}); // "/tmp/foo-112116-2662-avhu28"

Installation

Make sure you have node.js and npm installed, then run:

npm install gettemporaryfilepath

License

Based on node-temp and licensed under the 3-clause BSD license -- see the LICENSE file for details.

Current Tags

  • 1.0.0                                ...           latest (3 years ago)

2 Versions

  • 1.0.0                                ...           3 years ago
  • 0.0.1                                ...           8 years ago
Maintainers (1)
Downloads
Today 3
This Week 3
This Month 8
Last Day 0
Last Week 8
Last Month 90
Dependencies (0)
None
Dev Dependencies (4)

Copyright 2014 - 2016 © taobao.org |