xdg_directories
v1.1.0A Dart package for reading XDG directory configuration information on Linux.
Package archive: https://pubdev.letsnova.ru/api/archives/xdg_directories/1.1.0.tar.gz
dart pub add xdg_directoriesReadme
xdg_directories
A Dart package for reading XDG directory configuration information on Linux.
Getting Started
On Linux, 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$XDG_DATA_HOME). -
configHome- The a single base directory relative to which user-specific configuration files should be written. (Corresponds to$XDG_CONFIG_HOME). -
dataDirs- The list of preference-ordered base directories relative to which data files should be searched. (Corresponds to$XDG_DATA_DIRS). -
configDirs- The list of preference-ordered base directories relative to which configuration files should be searched. (Corresponds to$XDG_CONFIG_DIRS). -
cacheHome- The base directory relative to which user-specific non-essential (cached) data should be written. (Corresponds to$XDG_CACHE_HOME). -
runtimeDir- The base directory relative to which user-specific runtime files and other file objects should be placed. (Corresponds to$XDG_RUNTIME_DIR). -
getUserDirectoryNames()- Returns a set of the names of user directories defined in thexdgconfiguration files. -
getUserDirectory(String dirName)- Gets the value of the user dir with the given name. Requesting a user dir that doesn't exist returnsnull. ThedirNameargument is case-insensitive. See this wiki for more details and what values ofdirNamemight be available.
Changelog
1.1.0
- Updates minimum supported SDK version to Flutter 3.19/Dart 3.3.
- Adds
stateHomeproperty forXDG_STATE_HOME.
1.0.4
- Updates minimum supported SDK version to Flutter 3.10/Dart 3.0.
- Fixes new lint warnings.
1.0.3
- Adds pub topics to package metadata.
- Updates minimum supported SDK version to Flutter 3.7/Dart 2.19.
1.0.2
- Adds example app to demonstrate how to use the package.
1.0.1
- Removes
processdependency. - Updates minimum supported SDK version to Flutter 3.3/Dart 2.18.
1.0.0
- Updates version to 1.0 to reflect the level of API stability.
- Updates minimum SDK version to Flutter 3.0.
0.2.0+3
- Returns null instead of throwing exception from getUserDirectory when xdg-user-dir executable is missing.
0.2.0+2
- Fixes unit tests on Windows.
- Fixes lint warnings.
0.2.0+1
- Marks the package as Linux-only using the new Dart
platformskey.
0.2.0
- Migrated to null safety.
0.1.2
- Broaden dependencies to allow nullsafety version of process, meta, and path to be OK.
0.1.1
- Remove flutter, flutter_test from pubspec dependencies.
0.1.0
- Initial release includes all the features described in the README.md
