quick-tmp
Quickly and synchronously retrieve a temporary directory name for you to use
Last updated 13 years ago by hughsk .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install quick-tmp 
SYNC missed versions from official npm registry.

quick-tmp Flattr this!experimental

Quickly and synchronously retrieve a temporary directory name for you to use.

Using the name generation from the tmp module, but allowing you to handle writing and removing of directories/files.

Usage

quick-tmp

getDirectory = quickTmp([prefix])

Configures the temporary directory's prefix, which defaults to 'quicktmp'.

directory = getDirectory([retries])

Return a random temporary directory name. You'll have to create the directory yourself. retries determines how many times to try finding a folder not that doesn't already exist, and defaults to 10.

// straight away:
var directory = require('quick-tmp')('prefix')()
// or later:
var getDirectory = require('quick-tmp')('prefix')
getDirectory()
// => '/var/folders/43/z7pv8pvd4x57nt_1zz2561tw0000gn/T/prefix-43831t6vveao'

License

MIT. See LICENSE.md for details.

Current Tags

  • 1.0.0                                ...           latest (11 years ago)

2 Versions

  • 1.0.0                                ...           11 years ago
  • 0.0.0                                ...           13 years ago
Maintainers (1)
Downloads
Total 3
Today 0
This Week 0
This Month 2
Last Day 0
Last Week 2
Last Month 0
Dependencies (2)
Dev Dependencies (0)
None

© 2010 - cnpmjs.org x YWFE | Home | YWFE