-
Notifications
You must be signed in to change notification settings - Fork 166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Non-standard file locations #195
Comments
^ this. It's the new wine. Very like. XDG Base Directory SpecificationVersion 0.7 -- 24th November 2010Waldo Bastian Table of Contents
IntroductionVarious specifications specify files and file formats. This specification defines where these files should be looked for by defining one or more base directories relative to which files should be located. BasicsThe XDG Base Directory Specification is based on the following concepts:
All paths set in these environment variables must be absolute. If an implementation encounters a relative path in any of these variables it should consider the path invalid and ignore it. Environment variables
If
If The order of base directories denotes their importance; the first directory listed is the most important. When the same information is defined in multiple places the information defined relative to the more important base directory takes precedent. The base directory defined by
The lifetime of the directory MUST be bound to the user being logged in. It MUST be created when the user first logs in and if the user fully logs out the directory MUST be removed. If the user logs in more than once he should get pointed to the same directory, and it is mandatory that the directory continues to exist from his first login to his last logout on the system, and not removed in between. Files in the directory MUST not survive reboot or a full logout/login cycle. The directory MUST be on a local file system and not shared with any other system. The directory MUST by fully-featured by the standards of the operating system. More specifically, on Unix-like operating systems AF_UNIX sockets, symbolic links, hard links, proper permissions, file locking, sparse files, memory mapping, file change notifications, a reliable hard link count must be supported, and no restrictions on the file name character set should be imposed. Files in this directory MAY be subjected to periodic clean-up. To ensure that your files are not removed, they should have their access time timestamp modified at least once every 6 hours of monotonic time or the 'sticky' bit should be set on the file. If Referencing this specificationOther specifications may reference this specification by specifying the location of a data file as
Specifications may reference this specification by specifying the location of a configuration file as
If, when attempting to write a file, the destination directory is non-existant an attempt should be made to create it with permission When attempting to read a file, if for any reason a file in a certain directory is unaccessible, e.g. because the directory is non-existant, the file is non-existant or the user is not authorized to open the file, then the processing of the file in that directory should be skipped. If due to this a required file could not be found at all, the application may chose to present an error message to the user. A specification that refers to |
Hello there, It would be great for haxor-news to use the standard XDG directories to save data. In this case
~/.haxornewsconfig
could be$XDG_CONFIG_HOME/haxornewsconfig
, usually~/.config/haxornewsconfig
and.haxornewshistory
could be$XDG_DATA_HOME/haxornewshistory
.Would this be something you're willing to discuss?
The text was updated successfully, but these errors were encountered: