justjavac / deno_executable_dir

Returns the path to the user's executable directory.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

deno_executable_dir

tag Build Status license

In v1.1.2(2020.06.26), Deno Remove Deno.dir and 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 executableDir from "https://deno.land/x/executable_dir/mod.ts";

executableDir();
// Lin: "/home/justjavac/.local/bin"
// Mac: null
// Win: null

License

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

About

Returns the path to the user's executable directory.

License:MIT License


Languages

Language:TypeScript 100.0%