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

temp-dir

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

import temporaryDirectory from 'temp-dir';

console.log(temporaryDirectory);
//=> '/private/var/folders/3x/jf5977fn79jbglr7rk0tq4d00000gn/T'
import os from 'node:os';

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

Current Tags

  • 3.0.0                                ...           latest (2 years ago)

3 Versions

  • 3.0.0                                ...           2 years ago
  • 2.0.0                                ...           6 years ago
  • 1.0.0                                ...           8 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 0
Dependencies (0)
None
Dev Dependencies (3)

Copyright 2013 - present © cnpmjs.org | Home |