Expand description
These strategies simply provide the user’s configuration, data, and cache directories, without knowing about the application specifically.
Structs§
- Apple
- This is the strategy created by Apple for use on macOS and iOS devices. It is always used by GUI apps on macOS, and is sometimes used by command-line applications there too. iOS only has GUIs, so all iOS applications follow this strategy. The specification is available here.
- Windows
- This strategy follows Windows’ conventions. It seems that all Windows GUI apps, and some command-line ones follow this pattern. The specification is available here.
- Xdg
- This strategy implements the XDG Base Directories Specification. It is the most common on Linux, but is increasingly being adopted elsewhere.
Traits§
- Base
Strategy - Provides configuration, data, and cache directories of the current user.
Functions§
- choose_
base_ strategy - Returns the current OS’s default
BaseStrategy. This uses theWindowsstrategy on Windows, andXdgeverywhere else. This is the convention used by most CLI applications. - choose_
native_ strategy - Returns the current OS’s native
BaseStrategy. This uses theWindowsstrategy on Windows,Appleon macOS & iOS, andXdgeverywhere else. This is the convention used by most GUI applications.