Skip to content 

DirectoryFactory Class

Packages > @fluidframework/map > DirectoryFactory

The factory that defines the directory.

Signature:

/** @sealed */
export declare class DirectoryFactory 

Properties

List of properties for this class
Property Modifiers Type Description
attributes IChannelAttributes Attributes of the channel.
Attributes static IChannelAttributes Attributes of the channel.
type string String representing the type of the factory.
Type static (not declared) String representing the type of the factory.

Methods

List of methods on this class
Method Modifiers Description
create(runtime, id) Creates a local version of the channel. Calling attach on the object later will insert it into the object stream.
load(runtime, id, services, branchId, attributes) Loads the given channel. This call is only ever invoked internally as the only thing that is ever directly loaded is the document itself. Load will then only be called on documents that were created and added to a channel.

Properties

attributes

Attributes of the channel.

Signature:

get attributes(): IChannelAttributes;

Attributes

Attributes of the channel.

Signature:

static readonly Attributes: IChannelAttributes;

type

String representing the type of the factory.

Signature:

get type(): string;

Type

String representing the type of the factory.

Signature:

static readonly Type = "https://graph.microsoft.com/types/directory";

Methods

create

Creates a local version of the channel. Calling attach on the object later will insert it into the object stream.

Signature:

create(runtime: IFluidDataStoreRuntime, id: string): ISharedDirectory;

Parameters

List of parameters
Parameter Type Description
runtime IFluidDataStoreRuntime The runtime the new object will be associated with
id string The unique ID of the new object

Returns:

ISharedDirectory

The newly created object.

load

Loads the given channel. This call is only ever invoked internally as the only thing that is ever directly loaded is the document itself. Load will then only be called on documents that were created and added to a channel.

Signature:

load(runtime: IFluidDataStoreRuntime, id: string, services: IChannelServices, branchId: string, attributes: IChannelAttributes): Promise<ISharedDirectory>;

Parameters

List of parameters
Parameter Type Description
runtime IFluidDataStoreRuntime Data store runtime containing state/info/helper methods about the data store.
id string ID of the channel.
services IChannelServices Services to read objects at a given path using the delta connection.
branchId string The branch ID.
attributes IChannelAttributes

Returns:

Promise<ISharedDirectory>

The loaded object