FluidFetchReader Class
Packages > @fluidframework/file-driver > FluidFetchReader
Document storage service for the file driver.
Signature:
export declare class FluidFetchReader extends ReadDocumentStorageServiceBase implements IDocumentStorageService
Extends: ReadDocumentStorageServiceBase
Implements: IDocumentStorageService
Constructors
Constructor | Modifiers | Description |
---|---|---|
(constructor)(path, versionName) | Constructs a new instance of the FluidFetchReader class |
Properties
Property | Modifiers | Type | Description |
---|---|---|---|
docTree | api.ISnapshotTree | null |
Methods
Method | Modifiers | Description |
---|---|---|
getSnapshotTree(version) | Read the file and returns the snapshot tree. | |
getVersions(versionId, count) | Gets the path of the snapshot tree to be read. | |
read(sha) | Finds if a file exists and returns the contents of the blob file. | |
readBlob(sha) |
Constructors
FluidFetchReader.(constructor)
Constructs a new instance of the FluidFetchReader
class
Signature:
constructor(path: string, versionName?: string | undefined);
Parameters
Parameter | Type | Description |
---|---|---|
path | string | |
versionName | string | undefined |
Properties
docTree
Signature:
protected docTree: api.ISnapshotTree | null;
Methods
getSnapshotTree
Read the file and returns the snapshot tree.
Signature:
getSnapshotTree(version?: api.IVersion): Promise<api.ISnapshotTree | null>;
Parameters
Parameter | Type | Description |
---|---|---|
version | api.IVersion | The version contains the path of the file which contains the snapshot tree. |
Returns:
Promise<api.ISnapshotTree | null>
getVersions
Gets the path of the snapshot tree to be read.
Signature:
getVersions(versionId: string, count: number): Promise<api.IVersion[]>;
Parameters
Parameter | Type | Description |
---|---|---|
versionId | string | version ID. |
count | number | Number of versions to be returned. |
Returns:
Promise<api.IVersion[]>
read
Finds if a file exists and returns the contents of the blob file.
Signature:
read(sha: string): Promise<string>;
Parameters
Parameter | Type | Description |
---|---|---|
sha | string | Name of the file to be read for blobs. |
Returns:
Promise<string>
readBlob
Signature:
readBlob(sha: string): Promise<ArrayBufferLike>;
Parameters
Parameter | Type | Description |
---|---|---|
sha | string |
Returns:
Promise<ArrayBufferLike>