https://github.com/justjavac/deno_executable_dir
Returns the path to the user's executable directory.
https://github.com/justjavac/deno_executable_dir
deno deno-mod deno-module deno-modules deno-starter directory path
Last synced: about 1 month ago
JSON representation
Returns the path to the user's executable directory.
- Host: GitHub
- URL: https://github.com/justjavac/deno_executable_dir
- Owner: justjavac
- License: mit
- Created: 2020-08-19T13:36:36.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-08-19T14:18:36.000Z (almost 6 years ago)
- Last Synced: 2025-03-05T05:38:36.698Z (over 1 year ago)
- Topics: deno, deno-mod, deno-module, deno-modules, deno-starter, directory, path
- Language: TypeScript
- Homepage:
- Size: 4.88 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# deno_executable_dir
[](https://github.com/justjavac/deno_executable_dir/releases)
[](https://github.com/justjavac/deno_executable_dir/actions)
[](https://github.com/justjavac/deno_executable_dir/blob/master/LICENSE)
[](https://github.com/denoland/deno)
> _In v1.1.2(2020.06.26), Deno [Remove `Deno.dir` and dirs dependency #6385](https://github.com/denoland/deno/pull/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.
```ts
import executableDir from "https://deno.land/x/executable_dir/mod.ts";
executableDir();
// Lin: "/home/justjavac/.local/bin"
// Mac: null
// Win: null
```
## License
[deno_executable_dir](https://github.com/justjavac/deno_executable_dir) is released under the MIT License. See the bundled [LICENSE](./LICENSE) file for details.