ISharedDirectoryEvents Interface
Events emitted in response to changes to the directory data.
To use, import via fluid-framework/legacy
.
For more information about our API support guarantees, see here.
This type is "sealed," meaning that code outside of the library defining it should not implement or extend it. Future versions of this type may add members or make typing of readonly members more specific.
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.
For more information about our API support guarantees, see here.
This type is "sealed," meaning that code outside of the library defining it should not implement or extend it. Future versions of this type may add members or make typing of readonly members more specific.
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.
For more information about our API support guarantees, see here.
This type is "sealed," meaning that code outside of the library defining it should not implement or extend it. Future versions of this type may add members or make typing of readonly members more specific.
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.
For more information about our API support guarantees, see here.
This type is "sealed," meaning that code outside of the library defining it should not implement or extend it. Future versions of this type may add members or make typing of readonly members more specific.
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.
For more information about our API support guarantees, see here.
This type is "sealed," meaning that code outside of the library defining it should not implement or extend it. Future versions of this type may add members or make typing of readonly members more specific.
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.