GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — doc: add documentation about os.tmpdir() overrides · nodejs/node@5bfb4bc

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • doc/api
    • os.md
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎doc/api/os.md‎

Copy file name to clipboardExpand all lines: doc/api/os.md
+13Lines changed: 13 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -416,6 +416,19 @@ changes:
416416
Returns the operating system's default directory for temporary files as a
417417
string.
418418

419+
On Windows, the result can be overridden by `TEMP` and `TMP` environment variables, and
420+
`TEMP` takes precedence over `TMP`. If neither is set, it defaults to `%SystemRoot%\temp`
421+
or `%windir%\temp`.
422+
423+
On non-Windows platforms, `TMPDIR`, `TMP` and `TEMP` environment variables will be checked
424+
to override the result of this method, in the described order. If none of them is set, it
425+
defaults to `/tmp`.
426+
427+
Some operating system distributions would either configure `TMPDIR` (non-Windows) or
428+
`TEMP` and `TMP` (Windows) by default without additional configurations by the system
429+
administrators. The result of `os.tmpdir()` typically reflects the system preference
430+
unless it's explicitly overridden by the users.
431+
419432
## `os.totalmem()`
420433

421434
<!-- YAML

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.