FileSnapshotReader Class
Signature
export declare class FileSnapshotReader extends ReadDocumentStorageServiceBase implements IDocumentStorageService
Extends: ReadDocumentStorageServiceBase
Implements: IDocumentStorageService
Constructors
| Constructor | Description |
|---|---|
| (constructor)(json) | Constructs a new instance of the FileSnapshotReader class |
Static Properties
| Property | Type | Description |
|---|---|---|
| FileStorageVersionTreeId |
Properties
| Property | Modifiers | Type | Description |
|---|---|---|---|
| blobs | Map<string, ArrayBufferLike> | ||
| commits | { [key: string]: ITree; } | ||
| docId | optional | string | |
| docTree | ISnapshotTree | ||
| trees | { [key: string]: ISnapshotTree; } |
Methods
| Method | Return Type | Description |
|---|---|---|
| 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
| Parameter | Type | Description |
|---|---|---|
| json | IFileSnapshot |
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
| Parameter | Modifiers | Type | Description |
|---|---|---|---|
| versionRequested | optional | IVersion |
Returns
Return type: Promise<ISnapshotTree | null>
getVersions
Signature
getVersions(versionId: string | null, count: number): Promise<IVersion[]>;
Parameters
| Parameter | Type | Description |
|---|---|---|
| versionId | string | null | |
| count | number |
Returns
Return type: Promise<IVersion[]>
readBlob
Signature
readBlob(blobId: string): Promise<ArrayBufferLike>;
Parameters
| Parameter | Type | Description |
|---|---|---|
| blobId | string |
Returns
Return type: Promise<ArrayBufferLike>