| 1 |
.. module:: xdg.BaseDirectory |
| 2 |
|
| 3 |
Base Directories |
| 4 |
================ |
| 5 |
|
| 6 |
The `XDG Base Directory specification <http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html>`_ |
| 7 |
provides standard locations to store application data, configuration, and cached |
| 8 |
data. |
| 9 |
|
| 10 |
Data directories |
| 11 |
---------------- |
| 12 |
|
| 13 |
.. autofunction:: save_data_path |
| 14 |
|
| 15 |
.. autofunction:: load_data_paths |
| 16 |
|
| 17 |
.. data:: xdg_data_home |
| 18 |
|
| 19 |
$XDG_DATA_HOME or the default, ``~/.local/share`` |
| 20 |
|
| 21 |
.. data:: xdg_data_dirs |
| 22 |
|
| 23 |
A list of directory paths in which application data may be stored, in |
| 24 |
preference order. |
| 25 |
|
| 26 |
Configuration directories |
| 27 |
------------------------- |
| 28 |
|
| 29 |
.. autofunction:: save_config_path |
| 30 |
|
| 31 |
.. autofunction:: load_config_paths |
| 32 |
|
| 33 |
.. autofunction:: load_first_config |
| 34 |
|
| 35 |
.. data:: xdg_config_home |
| 36 |
|
| 37 |
$XDG_CONFIG_HOME or the default, ``~/.config`` |
| 38 |
|
| 39 |
.. data:: xdg_config_dirs |
| 40 |
|
| 41 |
A list of directory paths in which configuration may be stored, in preference |
| 42 |
order. |
| 43 |
|
| 44 |
|
| 45 |
Cache directory |
| 46 |
--------------- |
| 47 |
|
| 48 |
.. autofunction:: save_cache_path |
| 49 |
|
| 50 |
.. data:: xdg_cache_home |
| 51 |
|
| 52 |
$XDG_CACHE_HOME or the default, ``~/.cache`` |
| 53 |
|
| 54 |
State directory |
| 55 |
--------------- |
| 56 |
|
| 57 |
.. autofunction:: save_state_path |
| 58 |
|
| 59 |
.. data:: xdg_state_home |
| 60 |
|
| 61 |
$XDG_STATE_HOME or the default, ``~/.local/state`` |
| 62 |
|
| 63 |
Runtime directory |
| 64 |
----------------- |
| 65 |
|
| 66 |
.. autofunction:: get_runtime_dir |
| 67 |
|
| 68 |
.. versionadded:: 0.25 |