#+title: BaseDirs
#+author: tecosaur

#+html: <a href="https://tecosaur.github.io/BaseDirs.jl/stable/"><img src="https://img.shields.io/badge/docs-stable-blue.svg"></a>
#+html: <a href="https://tecosaur.github.io/BaseDirs.jl/dev/"><img src="https://img.shields.io/badge/docs-dev-blue.svg"></a>
#+html: <a href="https://github.com/tecosaur/BaseDirs.jl/actions?query=workflow%3ACI"><img src="https://github.com/tecosaur/BaseDirs.jl/workflows/CI/badge.svg"></a>
#+html: <a href="https://coveralls.io/github/tecosaur/BaseDirs.jl"><img src="https://coveralls.io/repos/github/tecosaur/BaseDirs.jl/badge.svg"></a>

This package exists to help you *put and look for files in the appropriate place(s)*.

It is essentially an implementation of the XDG (Cross-Desktop Group) directory
specifications, with analogues for Windows and MacOS for cross-platform. More
specifically, this is a hybrid of:
+ The [[https://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html][XDG base directory]] and the [[https://www.freedesktop.org/wiki/Software/xdg-user-dirs/][XDG user directory]] specifications on Linux
+ The [[https://msdn.microsoft.com/en-us/library/windows/desktop/dd378457.aspx][Known Folder]] API on Windows
+ The [[https://developer.apple.com/library/content/documentation/FileManagement/Conceptual/FileSystemProgrammingGuide/FileSystemOverview/FileSystemOverview.html#//apple_ref/doc/uid/TP40010672-CH2-SW6][Standard Directories]] guidelines on MacOS

** Why should I care?

It may be easy to treat file paths haphazardly, but for the user in particular
abiding by the standards/conventions of the their platform has a number of major
benefits, such as:

+ Improved ease of backups, since it is easier to make rules for which folders need to be backed up.
+ Improved configuration portability, since it is easier to identify and share the relevant configuration files.
+ Ease of isolating application state, by containing state to a single directory it is easy to avoid sharing it.
+ Decreased reliance on hard-coded paths, improving flexibility and composability.

It is worth noting that these considerations apply to *both* graphical and
command-line desktop applications.
