A Dart package for reading XDG directory configuration information on Linux.
Getting Started #
xdg is a system developed by freedesktop.org, a
project to work on interoperability and shared base technology for free software
desktop environments for Linux.
This Dart package can be used to determine the directory configuration
information defined by
xdg, such as where the Documents or Desktop directories
are. These are called "user directories" and are defined in configuration file
in the user's home directory.
See this wiki for more details of the XDG Base Directory implementation.
To use this package, the basic XDG values for the following are available via a Dart API:
dataHome- The single base directory relative to which user-specific data files should be written. (Corresponds to
configHome- The a single base directory relative to which user-specific configuration files should be written. (Corresponds to
dataDirs- The list of preference-ordered base directories relative to which data files should be searched. (Corresponds to
configDirs- The list of preference-ordered base directories relative to which configuration files should be searched. (Corresponds to
cacheHome- The base directory relative to which user-specific non-essential (cached) data should be written. (Corresponds to
runtimeDir- The base directory relative to which user-specific runtime files and other file objects should be placed. (Corresponds to
getUserDirectoryNames()- Returns a set of the names of user directories defined in the
getUserDirectory(String dirName)- Gets the value of the user dir with the given name. Requesting a user dir that doesn't exist returns
dirNameargument is case-insensitive. See this wiki for more details and what values of
dirNamemight be available.
[0.1.0] - Initial Release #
- Initial release includes all the features described in the README.md
Use this package as a library
1. Depend on it
Add this to your package's pubspec.yaml file:
dependencies: xdg_directories: ^0.1.0
2. Install it
You can install packages from the command line:
$ flutter pub get
Alternatively, your editor might support
flutter pub get.
Check the docs for your editor to learn more.
3. Import it
Now in your Dart code, you can use:
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
We analyzed this package on May 26, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:
- Dart: 2.8.1
- pana: 0.13.8-dev
- Flutter: 1.17.0
Maintain an example. (-10 points)
Create a short demo in the
example/ directory to show how to use this package.
Common filename patterns include
xdg_directories.dart. Packages with multiple examples should provide
For more information see the pub package layout conventions.
|Dart SDK||>=2.3.0 <3.0.0|