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