FulcrumFS FulcrumFS
FulcrumFS FulcrumFS
DocFX + Singulink = ♥

Search Results for

    Method IFileRepo.OpenVariantAsync

    IFileRepo.OpenVariantAsync(FileId, string, FileAccessPattern)

    Opens a read-only, seekable stream over the content of an existing variant of a file. The caller owns the stream and must dispose it.

    Declaration
    ValueTask<Stream> IFileRepo.OpenVariantAsync(FileId fileId, string variantId, FileAccessPattern accessPattern)
    Parameters
    Type Name Description
    FileId fileId

    The ID of the main file.

    string variantId

    The ID of the variant.

    FileAccessPattern accessPattern

    How the caller is going to read the stream: from start to end, or by seeking within it. This is a hint that the implementation may use to choose how it reads the content; the stream can be read either way.

    Returns
    Type Description
    ValueTask<Stream>
    Implements
    IFileRepo.OpenVariantAsync(FileId, string, FileAccessPattern)
    Remarks

    This is equivalent to GetVariantAsync(FileId, string) followed by OpenReadAsync(FileAccessPattern, CancellationToken), and the stream behaves the same way: it is seekable, may support only asynchronous reads, and the access pattern is only a hint.

    Exceptions
    Type Condition
    RepoFileNotFoundException

    The file or the variant does not exist.

    DanglingAliasException

    The variant is an alias whose source data file is missing (a subtype of RepoFileNotFoundException).

    ArgumentException

    variantId is empty or contains characters that are not allowed.

    © Singulink. All rights reserved.