import { assert } from "@fluidframework/common-utils" ; import { IChannelStorageService } from "@fluidframework/datastore-definitions" ; /**
 * Returns a new IChannelStorageService that resolves the given `path` as root.
 */ export class ObjectStoragePartition implements IChannelStorageService { constructor ( private readonly storage , private readonly path ) { assert ( ! path . endsWith ( "/" ) , 0x19c ) ; } public async readBlob ( path ) { return this . storage . readBlob ( `${ this . path }/${ path }` ) ; } public async contains ( path ) { return this . storage . contains ( `${ this . path }/${ path }` ) ; } public async list ( path ) { return this . storage . list ( `${ this . path }/${ path }` ) ; } }