Skip to main content

IChannelStorageService Interface

Storage services to read the objects at a given path.

This API is provided for existing users, but is not recommended for new users.

To use, import via @fluidframework/datastore-definitions/legacy.

For more information about our API support guarantees, see here.

Signature

export interface IChannelStorageService

Methods

MethodAlertsReturn TypeDescription
contains(path)BetaPromise<boolean>Determines if there is an object contained at the given path.
getSnapshotTree()BetaISnapshotTree | undefinedReturns the snapshot tree for the channel. This will help channels examine their snapshot when it consists of dynamic trees and blobs, i.e., the number of tree and blobs and / or their keys are not known in advance.
list(path)BetaPromise<string[]>Lists the blobs that exist at a specific path.
readBlob(path)BetaPromise<ArrayBufferLike>Reads the object contained at the given path. Returns a buffer representation for the object.

Method Details

contains

Determines if there is an object contained at the given path.

This API is provided for existing users, but is not recommended for new users.

For more information about our API support guarantees, see here.

Signature

contains(path: string): Promise<boolean>;

Parameters

ParameterTypeDescription
pathstring

Returns

Return type: Promise<boolean>

getSnapshotTree

Returns the snapshot tree for the channel. This will help channels examine their snapshot when it consists of dynamic trees and blobs, i.e., the number of tree and blobs and / or their keys are not known in advance.

This API is provided for existing users, but is not recommended for new users.

For more information about our API support guarantees, see here.

Signature

getSnapshotTree(): ISnapshotTree | undefined;

Returns

Return type: ISnapshotTree | undefined

list

Lists the blobs that exist at a specific path.

This API is provided for existing users, but is not recommended for new users.

For more information about our API support guarantees, see here.

Signature

list(path: string): Promise<string[]>;

Parameters

ParameterTypeDescription
pathstring

Returns

Return type: Promise<string[]>

readBlob

Reads the object contained at the given path. Returns a buffer representation for the object.

This API is provided for existing users, but is not recommended for new users.

For more information about our API support guarantees, see here.

Signature

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

Parameters

ParameterTypeDescription
pathstring

Returns

Return type: Promise<ArrayBufferLike>