Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You should adhere your application to the <strong><a href="http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html" rel="noreferrer">XDG Base Directory Specification</a></strong>. Most answers here are either obsolete or wrong.</p> <p>Your application should store and load data and configuration files to/from the directories pointed by the following environment variables:</p> <ul> <li><strong><code>$XDG_DATA_HOME</code></strong> (default: <code>"$HOME/.local/share"</code>): user-specific data files.</li> <li><strong><code>$XDG_CONFIG_HOME</code></strong> (default: <code>"$HOME/.config"</code>): user-specific configuration files.</li> <li><strong><code>$XDG_DATA_DIRS</code></strong> (default: <code>"/usr/local/share/:/usr/share/"</code>): precedence-ordered set of system data directories.</li> <li><strong><code>$XDG_CONFIG_DIRS</code></strong> (default: <code>"/etc/xdg"</code>): precedence-ordered set of system configuration directories.</li> <li><strong><code>$XDG_CACHE_HOME</code></strong> (default: <code>"$HOME/.cache"</code>): user-specific non-essential data files.</li> </ul> <p>You should first determine if the file in question is:</p> <ol> <li>A configuration file (<code>$XDG_CONFIG_HOME:$XDG_CONFIG_DIRS</code>);</li> <li>A data file (<code>$XDG_DATA_HOME:$XDG_DATA_DIRS</code>); or</li> <li>A non-essential (cache) file (<code>$XDG_CACHE_HOME</code>).</li> </ol> <p>It is recommended that your application put its files in a subdirectory of the above directories. Usually, something like <code>$XDG_DATA_DIRS/&lt;application&gt;/filename</code> or <code>$XDG_DATA_DIRS/&lt;vendor&gt;/&lt;application&gt;/filename</code>.</p> <p>When loading, you first try to load the file from the user-specific directories (<code>$XDG_*_HOME</code>) and, if failed, from system directories (<code>$XDG_*_DIRS</code>). When saving, save to user-specific directories only (since the user probably won't have write access to system directories).</p> <p>For other, more user-oriented directories, refer to the <strong><a href="http://www.freedesktop.org/wiki/Software/xdg-user-dirs" rel="noreferrer">XDG User Directories Specification</a></strong>. It defines directories for the Desktop, downloads, documents, videos, etc.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload