Base Directory Specification - XDG_*_DIRS syntax

Simon McVittie simon.mcvittie at collabora.co.uk
Wed Jan 4 05:57:51 PST 2012


On Mon, 26 Dec 2011 at 21:16:49 -0500, Charles Suprin wrote:
> Since no-one else has brought this up, there are portability
> considerations.  There are colons in Windows paths.  The ever famous
> c:\.  Also old versions of Apple products used to use colons as well
> for directory separators.

I believe XDG_DATA_DIRS and XDG_CONFIG_DIRS specifically target Unix: they're
an attempt to establish conventions for free Unix (Linux, *BSD etc.) analogous
to those that already exist on Windows and Mac OS (as imposed by
Microsoft, Apple respectively).

The GLib accessors for XDG_DATA_DIRS and XDG_CONFIG_DIRS are documented in
terms of "return an appropriate directory for ...", with a note that they
obey the basedir spec *on Unix*. They do something completely different on
Windows, involving the conventional Windows directories
(C:\Users\me\Application Data and so on).

    S


More information about the xdg mailing list