Class AccountPaths
Per-account storage paths; each account gets its own directory so databases never mix users.
Inherited Members
Namespace: Uniform.Matrix.Client.Configuration
Assembly: Uniform.Matrix.Client.dll
Syntax
public sealed class AccountPaths
Constructors
| Edit this page View SourceAccountPaths(IOptions<MatrixOptions>, IOptions<StorageOptions>, IHostEnvironment?)
Resolve paths for UserId; throw when it is not configured.
Declaration
public AccountPaths(IOptions<MatrixOptions> matrix, IOptions<StorageOptions> storage, IHostEnvironment? environment = null)
Parameters
| Type | Name | Description |
|---|---|---|
| IOptions<MatrixOptions> | matrix | Account settings. |
| IOptions<StorageOptions> | storage | Storage settings. |
| IHostEnvironment | environment | Host, whose application name selects the default data directory; |
Properties
| Edit this page View SourceCryptoKeyPath
32-byte key encrypting stored encryption state; readable only by the user.
Declaration
public string CryptoKeyPath { get; }
Property Value
| Type | Description |
|---|---|
| string |
DatabasePath
SQLite database file.
Declaration
public string DatabasePath { get; }
Property Value
| Type | Description |
|---|---|
| string |
Directory
Account directory.
Declaration
public string Directory { get; }
Property Value
| Type | Description |
|---|---|
| string |
MediaDirectory
Downloaded media files.
Declaration
public string MediaDirectory { get; }
Property Value
| Type | Description |
|---|---|
| string |
UserId
Configured account.
Declaration
public UserId UserId { get; }
Property Value
| Type | Description |
|---|---|
| UserId |
Methods
| Edit this page View SourceToDirectoryName(UserId)
Return a file-system-safe name such as alice_matrix.org.
Declaration
public static string ToDirectoryName(UserId userId)
Parameters
| Type | Name | Description |
|---|---|---|
| UserId | userId |
Returns
| Type | Description |
|---|---|
| string |
ToSafeName(string)
Replace characters that are invalid or awkward in file names with _.
Declaration
public static string ToSafeName(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name |
Returns
| Type | Description |
|---|---|
| string |