Class FileRepoOptions
Represents configuration options for a file repository.
Namespace: FulcrumFS
Assembly: FulcrumFS.Local.dll
Syntax
public sealed class FileRepoOptions
Remarks
The FileRepo checks and freezes the options when it is constructed, after which they can't be changed, and their setters throw an InvalidOperationException.
The members that are required have no default. The compiler requires them when the options are created in code, but not when they are bound from a configuration, so they read as not set until they are set, in any order, and the FileRepo constructor throws, with a message that names them, if one is still not set then.
Constructors
| Name | Description |
|---|---|
| FileRepoOptions() | Initializes a new instance of the FileRepoOptions class. |
| FileRepoOptions(IAbsoluteDirectoryPath, RepoFormatVersion) | Initializes a new instance of the FileRepoOptions class with the specified base directory and minimum format version for the file repository. |
Properties
| Name | Description |
|---|---|
| BaseDirectory | Gets or sets the base directory for the file repository, or null while it is not set. |
| DeleteMode | Gets or sets the mode used when files are deleted through the repository. Default is DeferredUntilClean. |
| FileIdMode | Gets or sets the mode used to generate file IDs in the repository. Default is Secure. |
| HealthCheckInterval | Gets or sets the interval at which health checks on the repo volume/directory are performed. Must be at least 1 second. Default is 15 seconds. |
| IsFrozen | Gets a value indicating whether the options are in use: a FileRepo checked them (see Validate()) when it was constructed with them, and they can no longer be changed. |
| MarkerFileLogging | Gets or sets the logging mode used to log information and errors to indeterminate and delete marker files. Default is HumanReadable. |
| MaxAccessWaitOrRetryTime | Gets or sets the maximum time that repository operations will wait for successful I/O access to the repository before throwing a TimeoutException. Must be between 1 second and 1 minute. Default is 8 seconds. |
| MinimumFormatVersion | Gets or sets the lowest format version the repository has once it is opened: a repository below it is upgraded when the FileRepo initializes, and one above it, within what this library supports, is used unchanged. Must be set: there is no default, because the right version depends on which processes and library versions use the repository. |
| ReadOnly | Gets or sets a value indicating whether the repository is opened read-only. Default is false. |
Methods
| Name | Description |
|---|---|
| Validate() | Checks the options as the FileRepo constructor does. The required BaseDirectory and MinimumFormatVersion are set. |