Method GetVariantAsync
GetVariantAsync(FileId, string)
Gets information about an existing file variant in the repository.
Declaration
public ValueTask<RepoFileInfo> GetVariantAsync(FileId fileId, string variantId)
Parameters
| Type | Name | Description |
|---|---|---|
| FileId | fileId | |
| string | variantId |
Returns
| Type | Description |
|---|---|
| ValueTask<RepoFileInfo> |
Remarks
A variant stored as an alias resolves to the data file of its source. If that file is missing, the variant is read again before anything is reported, for as long as each read finds a different alias marker: a retirement of the source that promoted or re-pointed the alias in the meantime is followed to the file the variant resolves to now. Only an alias that is found unchanged with its source data file still missing is reported, as a DanglingAliasException and through CorruptionDetected, whether or not its source is retired.
Exceptions
| Type | Condition |
|---|---|
| RepoFileNotFoundException | The variant was not found. |
| DanglingAliasException | The variant is an alias whose source data file is missing (a subtype of RepoFileNotFoundException). |