v0.1.0
Returns the path to the user's executable directory.
Repository
Current version released
5 years ago
Dependencies
std
Versions
deno_executable_dir
In v1.1.2(2020.06.26), Deno Remove
Deno.dirand dirs dependency #6385
Returns the path to the user’s executable 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_BIN_HOME or $XDG_DATA_HOME/../bin or $HOME/.local/bin |
/home/justjavac/.local/bin |
| macOS | - | - |
| Windows | - | - |
Usage
Requires allow-env permission.
Returns null if there is no applicable directory or if any other error occurs.
import executable_dir from "https://deno.land/x/executable_dir/mod.ts";
executable_dir();
// Lin: "/home/justjavac/.local/bin"
// Mac: null
// Win: nullLicense
deno_executable_dir is released under the MIT License. See the bundled LICENSE file for details.