ISharedDirectoryEvents Interface

Packages > fluid-framework > ISharedDirectoryEvents

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 ISharedDirectoryEvents extends ISharedObjectEvents

Extends: ISharedObjectEvents

Remarks

These events only emit on the ISharedDirectory itself, and not on subdirectories.

Call Signatures

CallSignature Alerts Description
(event: "valueChanged", listener: (changed: IDirectoryValueChanged, local: boolean, target: IEventThisPlaceHolder) => void): any Alpha Emitted when a key is set or deleted. This is emitted for any key in the ISharedDirectory or any subdirectory.
(event: "clear", listener: (local: boolean, target: IEventThisPlaceHolder) => void): any Alpha Emitted when the ISharedDirectory is cleared.
(event: "subDirectoryCreated", listener: (path: string, local: boolean, target: IEventThisPlaceHolder) => void): any Alpha Emitted when a subdirectory is created.
(event: "subDirectoryDeleted", listener: (path: string, local: boolean, target: IEventThisPlaceHolder) => void): any Alpha Emitted when a subdirectory is deleted.

Call Signature Details

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

Emitted when a key is set or deleted. This is emitted for any key in the ISharedDirectory or any subdirectory.

This API is provided as an alpha preview and may change without notice.

To use, import via fluid-framework/alpha.

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

Signature

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

Remarks

Listener parameters:

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

  • local - Whether the change originated from this client.

  • target - The ISharedDirectory itself.

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

Emitted when the ISharedDirectory is cleared.

This API is provided as an alpha preview and may change without notice.

To use, import via fluid-framework/alpha.

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

Signature

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

Remarks

Listener parameters:

  • local - Whether the clear originated from this client.

  • target - The ISharedDirectory itself.

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

Emitted when a subdirectory is created.

This API is provided as an alpha preview and may change without notice.

To use, import via fluid-framework/alpha.

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

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 create 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.

This API is provided as an alpha preview and may change without notice.

To use, import via fluid-framework/alpha.

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

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.