Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tecosaur/basedirs.jl
A cross platform implementation of the XDG Directory Spec
https://github.com/tecosaur/basedirs.jl
knownfolders standarddirectories xdg xdg-basedir xdg-user-dirs
Last synced: 2 days ago
JSON representation
A cross platform implementation of the XDG Directory Spec
- Host: GitHub
- URL: https://github.com/tecosaur/basedirs.jl
- Owner: tecosaur
- License: mit
- Created: 2023-01-24T17:05:29.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-12T11:23:01.000Z (3 months ago)
- Last Synced: 2024-11-15T15:49:36.727Z (2 months ago)
- Topics: knownfolders, standarddirectories, xdg, xdg-basedir, xdg-user-dirs
- Language: Julia
- Homepage:
- Size: 600 KB
- Stars: 33
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.org
- License: LICENSE
Awesome Lists containing this project
README
#+title: BaseDirs
#+author: tecosaur#+html:
#+html:
#+html:
#+html: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.