diff options
Diffstat (limited to 'cli/js')
-rw-r--r-- | cli/js/lib.deno.ns.d.ts | 11 | ||||
-rw-r--r-- | cli/js/os.ts | 9 | ||||
-rw-r--r-- | cli/js/os_test.ts | 8 |
3 files changed, 27 insertions, 1 deletions
diff --git a/cli/js/lib.deno.ns.d.ts b/cli/js/lib.deno.ns.d.ts index 0bd176a9f..b2e67b288 100644 --- a/cli/js/lib.deno.ns.d.ts +++ b/cli/js/lib.deno.ns.d.ts @@ -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 | diff --git a/cli/js/os.ts b/cli/js/os.ts index 309f5e1ff..89632e34f 100644 --- a/cli/js/os.ts +++ b/cli/js/os.ts @@ -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 | * | ------- | ------------------- | --------------------- | diff --git a/cli/js/os_test.ts b/cli/js/os_test.ts index 6825b7b0d..b0561840b 100644 --- a/cli/js/os_test.ts +++ b/cli/js/os_test.ts @@ -235,6 +235,14 @@ testPerm({ env: true }, function getDir(): void { ] }, { + kind: "tmp", + runtime: [ + { os: "mac", shouldHaveValue: true }, + { os: "win", shouldHaveValue: true }, + { os: "linux", shouldHaveValue: true } + ] + }, + { kind: "video", runtime: [ { os: "mac", shouldHaveValue: true }, |