Expand description
Directories used by Sequoia.
This crate is primarily for use by Sequoia libraries, and applications to locate their configuration, data, and cache directories.
By default, Sequoia uses the system’s standard locations for user data, configuration files, and cache data. On Linux, for instance, this means following the XDG base directory specification.
Sequoia programs also support using an alternate home directory. In this case, the user data, configuration files, and cache data are placed under a single, unified directory. This is a lightweight way to partially isolate a program.
An alternate home location can be specified when instantiating a
Home
object. The user is also able to override the default by
setting the SEQUOIA_HOME
environment variable. The default home
location is the user’s home directory. On Linux, this usually
looks like /home/USER
.
In a few cases, a program might need to use multiple home
directories. For instance, a program might not want to use the
user’s default configuration, or certificate store, but does want
to use the default key store. This is possible by instantiating
multiple Home
objects, and querying the appropriate home
directory.
When a program specifies an alternate home directory, we check if it aliases the default home directory. This check is performed at the file system level, and not just by comparing the paths. If the specified directory aliases the default directory, we treat it as the default and use the default layout.
Some programs may act differently depending on whether the home location is the default or not. For instance, the keystore uses the user’s default gpg-agent when using the default home location.
Structs§
- Home
- A Sequoia home directory.
Enums§
Type Aliases§
- Result
- This crate’s
Result
type.