![]() To access the XDG directories you would typically specify the subdirectory that these directories will be relative to. To ease working with the XDG Base Directory Specification from Tcl, I created the xdgbasedir module. So for example if the $XDG_DATA_HOME variable returned ~/.local/share, and your application was called myapp, you should look in ~/.local/share/myapp/ for that application's user-specific data files. These are: $XDG_DATA_HOMEĪ list of directories, in order of preference, which should be searched for data files.Ī list of directories, in order of preference, which should be searched for configuration files.įor each directory or for each directory in the list of directories (in the case of the environmental variables ending with _DIRS), you would normally append the name of your application. The specification uses six environmental variables to locate files. follows, for more look at the XDG Base Directory Specification recommended by. How Should I Locate Files Using the Specification?Ī brief explanation of the spec. config Documents Music retroĪrchive Desktop gpodder-downloads Public Templates For the application, it makes it much easier to work with files in a consistent manner on whichever Unix platform it is running. it makes it much easier for the user to find the files associated with your application so that they can edit and back them up. Why Use the XDG Base Directory Specification?īy storing an applications files using this spec. ![]() The xdgbasedir module allows you to easily access this specification from Tcl. The XDG Base Directory Specification describes a simple and clean way to locate these files across all Unix-like systems. This has lead to a mess of dot files in a user's home directory and other associated files being all over the file system. Unix has traditionally lacked a consistent way of storing user specific and system wide configuration and support files.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |