Skip to content

Returns the path to the user's local data directory.

License

Notifications You must be signed in to change notification settings

justjavac/deno_data_local_dir

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

deno_data_local_dir

tag Build Status license

In v1.1.2(2020.06.26), Deno Remove Deno.dir and dirs dependency #6385

Returns the path to the user's local data 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 $XDG_DATA_HOME or $HOME/.local/share /home/justjavac/.local/share
macOS $HOME/Library/Application Support /Users/justjavac/Library/Application Support
Windows {FOLDERID_LocalAppData} C:\Users\justjavac\AppData\Local

Usage

Requires allow-env permission.

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

import dataLocalDir from "https://deno.land/x/data_local_dir/mod.ts";

dataLocalDir();
// Lin: "/home/justjavac/.local/share"
// Mac: "/Users/justjavac/Library/Application Support"
// Win: "C:\Users\justjavac\AppData\Local"

License

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

About

Returns the path to the user's local data directory.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published