Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/yxz/index.ts>os.userConfigDir

Deno Standard Extensions
Go to Latest
function os.userConfigDir
import { os } from "https://deno.land/x/yxz@0.17.0/index.ts";
const { userConfigDir } = os;

Returns the default root directory to use for user-specific configuration data. Users should create their own application-specific subdirectory within this one and use that.

On Unix systems, it returns $XDG_CONFIG_HOME as specified by https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html if non-empty, else $HOME/.config. On Darwin, it returns $HOME/Library/Application Support. On Windows, it returns %AppData%.

If the location cannot be determined (for example, $HOME is not defined), then it will throw an error.