Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/xdg_app_paths/src/mod.deno.ts>XDGAppPaths

Determine (XDG-compatible) paths for storing application files (cache, config, data, etc)
Go to Latest
interface XDGAppPaths
Re-export
import { type XDGAppPaths } from "https://deno.land/x/xdg_app_paths@v8.2.0/src/mod.deno.ts";

XDGAppPaths (API) - Determine (XDG-compatible) paths for storing application files (cache, config, data, etc)

Call Signatures

(options?: Options | string): XDGAppPaths

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

Methods

new(options?: Options | string): XDGAppPaths

Create an XDGAppPaths object (new is optional).

cache(dirOptions?: DirOptions | boolean): string

Returns the directory for non-essential data files. > Deletion of the data contained here might cause an application to slow down.

config(dirOptions?: DirOptions | boolean): string

Returns the directory for config files. > Deletion of the data contained here might require the user to reconfigure an application.

data(dirOptions?: DirOptions | boolean): string

Returns the directory for data files. > Deletion of the data contained here might force the user to restore from backups.

runtime(dirOptions?: DirOptions | boolean): string | undefined

Returns the directory for runtime files; may return undefined. > Deletion of the data contained here might interfere with a currently executing application but should have no effect on future executions.

state(dirOptions?: DirOptions | boolean): string

Returns the directory for state files. > Deletion of the data contained here should not materially interfere with execution of an application.

configDirs(dirOptions?: DirOptions | boolean): readonly string[]

Returns a priority-sorted list of possible directories for configuration file storage (includes paths.config() as the first entry).

dataDirs(dirOptions?: DirOptions | boolean): readonly string[]

Returns a priority-sorted list of possible directories for data file storage (includes paths.data() as the first entry).

$name(): string

Application name used for path construction (from supplied configuration or auto-generated).

$isolated(): boolean

Default isolation mode used by the particular XDGAppPaths instance.