Skip to main content
Version: v1

FileSnapshotReader Class

Signature

export declare class FileSnapshotReader extends ReadDocumentStorageServiceBase implements IDocumentStorageService

Extends: ReadDocumentStorageServiceBase

Implements: IDocumentStorageService

Constructors

ConstructorDescription
(constructor)(json)Constructs a new instance of the FileSnapshotReader class

Static Properties

PropertyTypeDescription
FileStorageVersionTreeId

Properties

PropertyModifiersTypeDescription
blobsMap<string, ArrayBufferLike>
commits{ [key: string]: ITree; }
docIdoptionalstring
docTreeISnapshotTree
trees{ [key: string]: ISnapshotTree; }

Methods

MethodReturn TypeDescription
getSnapshotTree(versionRequested)Promise<ISnapshotTree | null>
getVersions(versionId, count)Promise<IVersion[]>
readBlob(blobId)Promise<ArrayBufferLike>

Constructor Details

(constructor)

Constructs a new instance of the FileSnapshotReader class

Signature

constructor(json: IFileSnapshot);

Parameters

ParameterTypeDescription
jsonIFileSnapshot

Property Details

blobs

Signature

protected blobs: Map<string, ArrayBufferLike>;

Type: Map<string, ArrayBufferLike>

commits

Signature

protected readonly commits: {
[key: string]: ITree;
};

Type: { [key: string]: ITree; }

docId

Signature

protected docId?: string;

Type: string

docTree

Signature

protected docTree: ISnapshotTree;

Type: ISnapshotTree

FileStorageVersionTreeId

Signature

protected static readonly FileStorageVersionTreeId = "FileStorageTreeId";

trees

Signature

protected readonly trees: {
[key: string]: ISnapshotTree;
};

Type: { [key: string]: ISnapshotTree; }

Method Details

getSnapshotTree

Signature

getSnapshotTree(versionRequested?: IVersion): Promise<ISnapshotTree | null>;

Parameters

ParameterModifiersTypeDescription
versionRequestedoptionalIVersion

Returns

Return type: Promise<ISnapshotTree | null>

getVersions

Signature

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

Parameters

ParameterTypeDescription
versionIdstring | null
countnumber

Returns

Return type: Promise<IVersion[]>

readBlob

Signature

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

Parameters

ParameterTypeDescription
blobIdstring

Returns

Return type: Promise<ArrayBufferLike>