mirror of
https://github.com/denoland/deno.git
synced 2025-08-03 10:33:54 +00:00
feat(std/node): add os.tmpdir() implementation (#4213)
This commit is contained in:
parent
ad21210edd
commit
2a594bd3b2
6 changed files with 38 additions and 11 deletions
11
cli/js/lib.deno.ns.d.ts
vendored
11
cli/js/lib.deno.ns.d.ts
vendored
|
@ -116,6 +116,7 @@ declare namespace Deno {
|
|||
| "picture"
|
||||
| "public"
|
||||
| "template"
|
||||
| "tmp"
|
||||
| "video";
|
||||
|
||||
// TODO(ry) markdown in jsdoc broken https://deno.land/typedoc/index.html#dir
|
||||
|
@ -131,7 +132,7 @@ declare namespace Deno {
|
|||
*
|
||||
* Argument values: `"home"`, `"cache"`, `"config"`, `"executable"`, `"data"`,
|
||||
* `"data_local"`, `"audio"`, `"desktop"`, `"document"`, `"download"`,
|
||||
* `"font"`, `"picture"`, `"public"`, `"template"`, `"video"`
|
||||
* `"font"`, `"picture"`, `"public"`, `"template"`, `"tmp"`, `"video"`
|
||||
*
|
||||
* `"cache"`
|
||||
*
|
||||
|
@ -237,6 +238,14 @@ declare namespace Deno {
|
|||
* | macOS | – | – |
|
||||
* | Windows | `{FOLDERID_Templates}` | C:\Users\Alice\AppData\Roaming\Microsoft\Windows\Templates |
|
||||
*
|
||||
* `"tmp"`
|
||||
*
|
||||
* |Platform | Value | Example |
|
||||
* | ------- | ---------------------- | ---------------------------------------------------------- |
|
||||
* | Linux | `TMPDIR` | /tmp |
|
||||
* | macOS | `TMPDIR` | /tmp |
|
||||
* | Windows | `{TMP}` | C:\Users\Alice\AppData\Local\Temp |
|
||||
*
|
||||
* `"video"`
|
||||
*
|
||||
* |Platform | Value | Example |
|
||||
|
|
|
@ -88,6 +88,7 @@ type DirKind =
|
|||
| "picture"
|
||||
| "public"
|
||||
| "template"
|
||||
| "tmp"
|
||||
| "video";
|
||||
|
||||
/**
|
||||
|
@ -191,6 +192,14 @@ type DirKind =
|
|||
* | macOS | – | – |
|
||||
* | Windows | `{FOLDERID_Templates}` | C:\Users\Alice\AppData\Roaming\Microsoft\Windows\Templates |
|
||||
*
|
||||
* "tmp"
|
||||
*
|
||||
* |Platform | Value | Example |
|
||||
* | ------- | ---------------------- | ---------------------------------------------------------- |
|
||||
* | Linux | `TMPDIR` | /tmp |
|
||||
* | macOS | `TMPDIR` | /tmp |
|
||||
* | Windows | `{TMP}` | C:\Users\Alice\AppData\Local\Temp |
|
||||
*
|
||||
* "video"
|
||||
* |Platform | Value | Example |
|
||||
* | ------- | ------------------- | --------------------- |
|
||||
|
|
|
@ -234,6 +234,14 @@ testPerm({ env: true }, function getDir(): void {
|
|||
{ os: "linux", shouldHaveValue: false }
|
||||
]
|
||||
},
|
||||
{
|
||||
kind: "tmp",
|
||||
runtime: [
|
||||
{ os: "mac", shouldHaveValue: true },
|
||||
{ os: "win", shouldHaveValue: true },
|
||||
{ os: "linux", shouldHaveValue: true }
|
||||
]
|
||||
},
|
||||
{
|
||||
kind: "video",
|
||||
runtime: [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue