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

x/xdg/src/mod.deno.ts>XDG

Determine XDG Base Directory paths (OS/platform portable)
Go to Latest
interface XDG
Re-export
import { type XDG } from "https://deno.land/x/xdg@v10.5.1/src/mod.deno.ts";

XDG (API) Determine XDG Base Directory paths (OS/platform portable).

Call Signatures

(): XDG

Create an XDG object (a preceding new is optional).

Methods

new(): XDG

Create an XDG object (new is optional).

cache(): string

Returns the directory path for user-specific non-essential (ie, cached) data files.

config(): string

Returns the directory path for user-specific configuration files.

data(): string

Returns directory path for user-specific data files.

runtime(): string | undefined

Returns the directory path for user-specific non-essential runtime files (such as sockets, named pipes, etc); may be undefined.

state(): string

Returns the directory path for user-specific state files (non-essential and more volatile than configuration files).

configDirs(): readonly string[]

Returns a preference-ordered array of base directory paths to search for configuration files (includes .config() directory as first entry).

dataDirs(): readonly string[]

Returns a preference-ordered array of base directory paths to search for data files (includes .data() directory as first entry).