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 |
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"
deno_picture_dir is released under the MIT License. See the bundled LICENSE file for details.