new VolumeWatcher()
- Description:
Monitors file system objects for changes.
- Source:
Extends
- EventEmitter
Methods
(async) AddWatches(watchList) → {Promise}
- Description:
Add or replace file system objects to be monitored
- Source:
Parameters:
| Name | Type | Description | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
watchList |
Array.<object> | Array of objects containing watch information. Properties
|
Throws:
-
- Thrown if 'watchList' does is not an array of objects.
- Type
- TypeError
Returns:
- A promise that when resolved will indicate if the watch targets were added.
- Type
- Promise
DeleteWatch(target) → {boolean}
- Description:
Delete a watch
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
target |
string | Oatg ti tge watch to be removed. |
Returns:
- trye if the watch item was deleted.
- Type
- boolean
ListWatches() → {Array.<string>}
- Description:
Provide a list of the watch targets
- Source:
Returns:
- Array of the watch targets
- Type
- Array.<string>
Terminate() → {void}
- Description:
Destructor
- Source:
Returns:
- Type
- void
(async) ValidateAccess(target, accessMode) → {Promise.<object>}
- Description:
Check to see if the current process has access to the specified target.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
target |
string | File system target. |
accessMode |
number | Mode for the access being sought. |
Returns:
Promise to validate the status of the item specified.
- Type
- Promise.<object>