Module: Utils::XDG

Included in:
Finder, IRB::IRBServer
Defined in:
lib/utils/xdg.rb

Overview

Module for handling XDG base directory specifications and application directory management.

Provides constants and methods for working with XDG (Cross-Desktop Group) base directories including data home, configuration home, state home, and cache home directories.

The module defines standard XDG directory paths and includes functionality for creating application-specific directories within these base locations.

Examples:

Utils::XDG::XDG_DATA_HOME # => Pathname object for the data home directory
Utils::XDG::XDG_CONFIG_HOME # => Pathname object for the config home directory
Utils::XDG::XDG_STATE_HOME # => Pathname object for the state home directory
Utils::XDG::XDG_CACHE_HOME # => Pathname object for the cache home directory

Defined Under Namespace

Modules: AppDir Classes: XDGPathname

Constant Summary collapse

XDG_DATA_HOME =

XDG Data Home directory path.

This is the base directory relative to which user-specific data files should be stored. The default value is ‘~/.local/share`.

Returns:

  • (Pathname)

    The data home directory path

AppDir.pathify(env_for('XDG_DATA_HOME', default: '~/.local/share'))
XDG_CONFIG_HOME =

XDG Configuration Home directory path.

This is the base directory relative to which user-specific configuration files should be stored. The default value is ‘~/.config`.

Returns:

  • (Pathname)

    The configuration home directory path

AppDir.pathify(env_for('XDG_CONFIG_HOME', default: '~/.config'))
XDG_STATE_HOME =

XDG State Home directory path.

This is the base directory relative to which user-specific state files should be stored. The default value is ‘~/.local/state`.

Returns:

  • (Pathname)

    The state home directory path

AppDir.pathify(env_for('XDG_STATE_HOME', default: '~/.local/state'))
XDG_CACHE_HOME =

XDG Cache Home directory path.

This is the base directory relative to which user-specific non-essential cache files should be stored. The default value is ‘~/.cache`.

Returns:

  • (Pathname)

    The cache home directory path

AppDir.pathify(env_for('XDG_CACHE_HOME', default: '~/.cache'))