summaryrefslogtreecommitdiff
path: root/docs/basedirectory.rst
blob: 6a6b188e6dcc283c6598c6b5c338d1da63d71b09 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
.. module:: xdg.BaseDirectory

Base Directories
================

The `XDG Base Directory specification <http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html>`_
provides standard locations to store application data, configuration, and cached
data.

Data directories
----------------

.. autofunction:: save_data_path

.. autofunction:: load_data_paths

.. data:: xdg_data_home

   $XDG_DATA_HOME or the default, ``~/.local/share``

.. data:: xdg_data_dirs

   A list of directory paths in which application data may be stored, in
   preference order.

Configuration directories
-------------------------

.. autofunction:: save_config_path

.. autofunction:: load_config_paths

.. autofunction:: load_first_config

.. data:: xdg_config_home

   $XDG_CONFIG_HOME or the default, ``~/.config``

.. data:: xdg_config_dirs

   A list of directory paths in which configuration may be stored, in preference
   order.


Cache directory
---------------

.. autofunction:: save_cache_path

.. data:: xdg_cache_home

   $XDG_CACHE_HOME or the default, ``~/.cache``

State directory
---------------

.. autofunction:: save_state_path

.. data:: xdg_state_home

   $XDG_STATE_HOME or the default, ``~/.local/state``

Runtime directory
-----------------

.. autofunction:: get_runtime_dir

   .. versionadded:: 0.25