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

Method Alerts Modifiers Return Type Description
contains(path) Alpha Promise<boolean> Determines if there is an object contained at the given path.
getSnapshotTree() Alpha optional ISnapshotTree | undefined 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.
list(path) Alpha Promise<string[]> Lists the blobs that exist at a specific path.
readBlob(path) Alpha Promise<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

Parameter Type Description
path string

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

Parameter Type Description
path string

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

Parameter Type Description
path string

Returns

Return type: Promise<ArrayBufferLike>