deno_video_dir

tag Build Status license

Returns the path to the user’s video 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_VIDEOS_DIR /home/justjavac/Videos
macOS $HOME/Movies /Users/justjavac/Movies
Windows {FOLDERID_Videos} C:\Users\justjavac\Videos

Usage

Requires allow-env permission.

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

import videoDir from "https://deno.land/x/video_dir/mod.ts";

videoDir();
// Lin: "/home/justjavac/Videos"
// Mac: "/Users/justjavac/Movies"
// Win: "C:\Users\justjavac\Videos"

License

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