IDirectoryEvents Interface

Packages > fluid-framework > IDirectoryEvents

Events emitted in response to changes to the directory data.

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

To use, import via fluid-framework/legacy.

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

Signature

/** @sealed */
export interface IDirectoryEvents extends IEvent

Extends: IEvent

Call Signatures

CallSignature Description
(event: "containedValueChanged", listener: (changed: IValueChanged, local: boolean, target: IEventThisPlaceHolder) => void): any Emitted when a key is set or deleted. As opposed to the ISharedDirectory's valueChanged event, this is emitted only on the IDirectory that directly contains the key.
(event: "subDirectoryCreated", listener: (path: string, local: boolean, target: IEventThisPlaceHolder) => void): any Emitted when a subdirectory is created. Also emitted when a delete of a subdirectory is rolled back.
(event: "subDirectoryDeleted", listener: (path: string, local: boolean, target: IEventThisPlaceHolder) => void): any Emitted when a subdirectory is deleted.
(event: "disposed", listener: (target: IEventThisPlaceHolder) => void): any Emitted when this sub directory is deleted.
(event: "undisposed", listener: (target: IEventThisPlaceHolder) => void): any Emitted when this previously deleted sub directory is restored. This event only needs to be handled in the case of rollback. If your application does not use the local rollback feature, you can ignore this event.

Call Signature Details

(event: “containedValueChanged”, listener: (changed: IValueChanged, local: boolean, target: IEventThisPlaceHolder) => void): any

Emitted when a key is set or deleted. As opposed to the ISharedDirectory ’s valueChanged event, this is emitted only on the IDirectory that directly contains the key.

Signature

(event: "containedValueChanged", listener: (changed: IValueChanged, local: boolean, target: IEventThisPlaceHolder) => void): any;

Remarks

Listener parameters:

  • changed - Information on the key that changed and its value prior to the change.

  • local - Whether the change originated from this client.

  • target - The IDirectory itself.

(event: “subDirectoryCreated”, listener: (path: string, local: boolean, target: IEventThisPlaceHolder) => void): any

Emitted when a subdirectory is created. Also emitted when a delete of a subdirectory is rolled back.

Signature

(event: "subDirectoryCreated", listener: (path: string, local: boolean, target: IEventThisPlaceHolder) => void): any;

Remarks

Listener parameters:

  • path - The relative path to the subdirectory that is created. It is relative from the object which raises the event.

  • local - Whether the creation originated from the this client.

  • target - The ISharedDirectory itself.

(event: “subDirectoryDeleted”, listener: (path: string, local: boolean, target: IEventThisPlaceHolder) => void): any

Emitted when a subdirectory is deleted.

Signature

(event: "subDirectoryDeleted", listener: (path: string, local: boolean, target: IEventThisPlaceHolder) => void): any;

Remarks

Listener parameters:

  • path - The relative path to the subdirectory that is deleted. It is relative from the object which raises the event.

  • local - Whether the delete originated from the this client.

  • target - The ISharedDirectory itself.

(event: “disposed”, listener: (target: IEventThisPlaceHolder) => void): any

Emitted when this sub directory is deleted.

Signature

(event: "disposed", listener: (target: IEventThisPlaceHolder) => void): any;

Remarks

Listener parameters:

(event: “undisposed”, listener: (target: IEventThisPlaceHolder) => void): any

Emitted when this previously deleted sub directory is restored. This event only needs to be handled in the case of rollback. If your application does not use the local rollback feature, you can ignore this event.

Signature

(event: "undisposed", listener: (target: IEventThisPlaceHolder) => void): any;

Remarks

Listener parameters: