temp-dir
Get the real path of the system temp directory
Last updated a year ago by sindresorhus .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install temp-dir 
SYNC missed versions from official npm registry.

temp-dir Build Status

Get the real path of the system temp directory

The os.tmpdir() built-in doesn't return the real path. That can cause problems when the returned path is a symlink, which is the case on macOS. Use this module to get the resolved path.

Install

$ npm install temp-dir

Usage

const tempDirectory = require('temp-dir');

console.log(tempDirectory);
//=> '/private/var/folders/3x/jf5977fn79jbglr7rk0tq4d00000gn/T'

console.log(require('os').tmpdir());
//=> '/var/folders/3x/jf5977fn79jbglr7rk0tq4d00000gn/T' // <= Symlink

License

MIT © Sindre Sorhus

Current Tags

  • 2.0.0                                ...           latest (a year ago)

2 Versions

  • 2.0.0                                ...           a year ago
  • 1.0.0                                ...           3 years ago
Maintainers (1)
Downloads
Today 923
This Week 17,001
This Month 27,206
Last Day 2,653
Last Week 15,955
Last Month 64,971
Dependencies (0)
None
Dev Dependencies (4)
Dependents (105)

Copyright 2014 - 2016 © taobao.org |