Skip to main content
Version: v1

FluidFetchReader Class

Document storage service for the file driver.

Signature​

export declare class FluidFetchReader extends ReadDocumentStorageServiceBase implements IDocumentStorageService

Extends: ReadDocumentStorageServiceBase

Implements: IDocumentStorageService

Constructors​

ConstructorDescription
(constructor)(path, versionName)Constructs a new instance of the FluidFetchReader class

Properties​

PropertyTypeDescription
docTreeapi.ISnapshotTree | null

Methods​

MethodReturn TypeDescription
getSnapshotTree(version)Promise<api.ISnapshotTree | null>Read the file and returns the snapshot tree.
getVersions(versionId, count)Promise<api.IVersion[]>Gets the path of the snapshot tree to be read.
readBlob(sha)Promise<ArrayBufferLike>

Constructor Details​

(constructor)​

Constructs a new instance of the FluidFetchReader class

Signature​

constructor(path: string, versionName?: string | undefined);

Parameters​

ParameterModifiersTypeDescription
pathstring
versionNameoptionalstring | undefined

Property Details​

docTree​

Signature​

protected docTree: api.ISnapshotTree | null;

Type: api.ISnapshotTree | null

Method Details​

getSnapshotTree​

Read the file and returns the snapshot tree.

Signature​

getSnapshotTree(version?: api.IVersion): Promise<api.ISnapshotTree | null>;

Parameters​

ParameterModifiersTypeDescription
versionoptionalapi.IVersionThe version contains the path of the file which contains the snapshot tree.

Returns​

Return type: Promise<api.ISnapshotTree | null>

getVersions​

Gets the path of the snapshot tree to be read.

Signature​

getVersions(versionId: string | null, count: number): Promise<api.IVersion[]>;

Parameters​

ParameterTypeDescription
versionIdstring | nullversion ID.
countnumberNumber of versions to be returned.

Returns​

Return type: Promise<api.IVersion[]>

readBlob​

Signature​

readBlob(sha: string): Promise<ArrayBufferLike>;

Parameters​

ParameterTypeDescription
shastring

Returns​

Return type: Promise<ArrayBufferLike>