Skip to content

Returns the path to the user's tmp directory.

License

Notifications You must be signed in to change notification settings

justjavac/deno_tmp_dir

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

deno_tmp_dir

tag Build Status license

Returns the path to the user's tmp directory.

The returned value depends on the operating system and is either a string, containing a value from the following table, or null.

Platform Value Example
Linux TMPDIR /tmp
macOS TMPDIR /tmp
Windows {TMP} C:\Users\justjavac\AppData\Local\Temp

Usage

Requires allow-env permission.

Returns null if there is no applicable directory or if any other error occurs.

import tmpDir from "https://deno.land/x/tmp_dir/mod.ts";

tmpDir();
// Lin: "/tmp"
// Mac: "/tmp"
// Win: "C:\Users\justjavac\AppData\Local\Temp"

License

deno_tmp_dir is released under the MIT License. See the bundled LICENSE file for details.