Permalink
Cannot retrieve contributors at this time
27 lines (18 sloc)
637 Bytes
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
codeql-action/node_modules/temp-dir/readme.md
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# temp-dir | |
> Get the real path of the system temp directory | |
[The `os.tmpdir()` built-in doesn't return the real path.](https://github.com/nodejs/node/issues/11422) 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 | |
```sh | |
npm install temp-dir | |
``` | |
## Usage | |
```js | |
import temporaryDirectory from 'temp-dir'; | |
console.log(temporaryDirectory); | |
//=> '/private/var/folders/3x/jf5977fn79jbglr7rk0tq4d00000gn/T' | |
``` | |
```js | |
import os from 'node:os'; | |
console.log(os.tmpdir()); | |
//=> '/var/folders/3x/jf5977fn79jbglr7rk0tq4d00000gn/T' // <= Symlink | |
``` |