rcmpy.xdg package#
Module contents#
A module for working with the XDG base directory specification.
https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
- rcmpy.xdg.config_directories(*parts: str, include_home: bool = True) Iterator[Path] [source]#
Yield a set of preference ordered base directories relative to which configuration files should be searched.
- rcmpy.xdg.data_directories(*parts: str, include_home: bool = True) Iterator[Path] [source]#
Yield a set of preference ordered base directories relative to which data files should be searched.
- rcmpy.xdg.ensure_absolute(path: Path | str | None, create: bool = False) Path [source]#
A wrapper to ensure that a path is an absolute one.
- rcmpy.xdg.iterate_directories(data: str, sep: str = ':', create: bool = False) Iterator[Path] [source]#
Iterate over directories specified in a PATH-like variable (some separator).
- rcmpy.xdg.root_directory(*parts: str) Path [source]#
Create a path from the current file-system’s root directory.
- rcmpy.xdg.user_bin(*parts: str, create: bool = True) Path [source]#
A single base directory relative to which user-specific executable files may be written.
- rcmpy.xdg.user_cache(*parts: str, create: bool = True) Path [source]#
A single base directory relative to which user-specific non-essential (cached) data should be written.
- rcmpy.xdg.user_config(*parts: str, create: bool = True) Path [source]#
A single base directory relative to which user-specific configuration files should be written.