Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/xdg/dist/types/mod.d.ts>XDG

Determine XDG Base Directory paths (OS/platform portable)
Go to Latest
interface XDG
import { type XDG } from "https://deno.land/x/xdg@v10.3.0/dist/types/mod.d.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).