xdgbasedir
This package eases access to the XDG Base Directory Specification. The specification describes a simple and clean way to locate an application’s data, configuration and miscellaneous files. It is a response to the inconsistent mess of files spread all across a file system by many applications.
1 Exported functions
(require xdgbasedir) |
In all the functions below subdir indicates the name of the application that the files relate to.
An exn:fail exception is raised if any of the functions are run on a non-unix system, because the defaults make little sense on these operating systems.
procedure
subdir : path-string?
procedure
(config-home subdir) → path?
subdir : path-string?
procedure
(cache-home subdir) → path?
subdir : path-string?
procedure
(runtime-dir subdir) → (or/c path? boolean?)
subdir : path-string?
procedure
subdir : path-string?
procedure
(config-dirs subdir) → (listof path?)
subdir : path-string?
2 Development
2.1 Contributing
If you want to improve this package, make a pull request to the repo on github. Please put any pull requests in a separate branch to ease integration and add a test to prove that it works.
2.2 Change Log
Removes xdgbasedir- prefix from exported functions
Various internal structural changes
Raises an exception if run on a non-Unix OS
Initial Release
3 Licence
This software is licensed as follows:
The MIT Licence
Copyright (c) 2013 Lawrence Woodman
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.