Hi! todo: library docs.
abstract class AppDirsThe directory locations for the current platform's conventions. This class factors in information like the application and company name.
final BaseDirs baseDirsThe base directories backing this [AppDirs] instance.
AppDirs({BaseDirs baseDirs})String get cachetodo: doc
String get configtodo: doc
String get datatodo: doc
String get dataLocaltodo: doc
String get preferencetodo: doc
String? get statetodo: doc
abstract class BaseDirsThe base directories for the current platform. These are the standard directories for the platform's conventions, but without taking into account things like the application name.
For directory locations that take application name into account, see [Directories.getAppDirectories] and [AppDirs].
BaseDirs()String get homeThe user's home directory. On Unix like systems, this will be $HOME. On
Windows, this will be $USERPROFILE.
String get cachetodo: doc
String get configtodo: doc
String get datatodo: doc
String get dataLocaltodo: doc
String get preferencetodo: doc
String? get statetodo: doc
class Directoriestodo: doc including base and getAppDirs
final BaseDirs baseDirsThe base directories for the current platform. These are the standard directories for the platform's conventions, but without taking into account things like the application name.
Most applications should instead use [Directories.getAppDirectories] to locate directories. That will take in account things like the application and organization name, and will locate directories using the platform's conventions.
Directories({Map<String, String>? env, OperatingSystem? os})Create a new [Directories] instance.
The [env] and [os] parameters allow you to override the system defaults. This is generally only useful for testing.
AppDirs appDirs({
String? qualifier,
String? organization,
String application,
bool preferUnixConventions = false,
})The directory locations for the current platform's conventions. This factors in information like the application and company name.
The [application], [qualifier] and [organization] information is used to
construct the correct app path. For instance, in Unix that path might be
'foobar-app', on Windows 'Baz Corp/Foo Bar App' and on MacOS
'org.Baz-Corp.Foo-Bar-App'.
The [preferUnixConventions] param is used to configure the MacOS directory
conventions used. This library defaults to the standard Mac conventions -
an app's config directory may look something like
~/Library/Application support/org.Baz-Corp.Foo-Bar-App. However, for some
apps - like command-line tools - a Unix convention may be more familiar to
users. Specify preferUnixConventions: true to use thos conventions
instead (the above path may then look something like
~/.config/foobar-app).
String toString()enum OperatingSystemThe operating system to assume for directory conventions; passed as a param to [Directories].
OperatingSystem unixUnix-like operating systems (like Linux).
OperatingSystem windowsWindows.
OperatingSystem macMacOS.
OperatingSystem()static OperatingSystem detect()Return the correct [OperatingSystem] enum for the current platform.