Huge news!Announcing our $20M Series A led by Andreessen Horowitz.Learn more
Socket
Socket
Log inDemoInstall

temp-dir

Package Overview
Dependencies
0
Maintainers
1
Versions
3
Issues
File Explorer

Advanced tools

Install Socket

Protect your apps from supply chain attacks

Install

temp-dir

Get the real path of the system temp directory

    3.0.0latest
    GitHub
    npm

Version published
Maintainers
1
Weekly downloads
10,935,548
decreased by-0.11%

Weekly downloads

Readme

Source

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

Keywords

FAQs

Last updated on 26 Sep 2022

Did you know?

Socket installs a GitHub app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install
SocketSocket SOC 2 Logo

Product

  • Package Issues
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc