v0.1.0
Returns the path to the user's picture directory.
Repository
Current version released
5 years ago
Versions
deno_picture_dir
Returns the path to the user’s picture 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_PICTURES_DIR |
/home/justjavac/Pictures |
| macOS | $HOME/Pictures |
/Users/justjavac/Pictures |
| Windows | {FOLDERID_Pictures} |
C:\Users\justjavac\Pictures |
Usage
Requires allow-env permission.
Returns null if there is no applicable directory or if any other error occurs.
import pictureDir from "https://deno.land/x/picture_dir/mod.ts";
pictureDir();
// Lin: "/home/justjavac/Pictures"
// Mac: "/Users/justjavac/Pictures"
// Win: "C:\Users\justjavac\Pictures"License
deno_picture_dir is released under the MIT License. See the bundled LICENSE file for details.