Interface IPathWatcher
Unit
Declaration
type IPathWatcher = interface(IInterface)
Description
Interface that represents an object to monitor a path, with methods to configure parameters and callback in addition to initializing the watch itself.
ignore files with the specified extension
Attributes
- GUID['{E995078A-19C1-4785-AE53-8A3113574A72}']
Hierarchy
- IInterface
- IPathWatcher
Overview
Methods
function Path(const APath: string): IPathWatcher; |
|
function Ignore(const AIgnoreKind: TIgnoreKind; AItems: TArray<string>): IPathWatcher; |
|
function Timeout(const ATime: Longint): IPathWatcher; |
|
function Run(const AWatcherRun: TWatcherRunCallback): IPathWatcher; |
|
function Start: IPathWatcher; |
Description
Methods
function Path(const APath: string): IPathWatcher; |
|
Sets the path to watch for changes. Returns self to allow chained watcher calls.
Parameters
|
function Ignore(const AIgnoreKind: TIgnoreKind; AItems: TArray<string>): IPathWatcher; |
|
Defines a set of values to be ignored according to the type provided as a parameter. Ex: to ignore all items, folders or files that start with "." just call the function as follows: Watcher.Ignore(ikStartsText, ['.']); Ex: to ignore all folders with specific names, call the function as follows: Watcher.Ignore(ikFolder, ['bin', 'lib', 'modules']); Returns self to allow chained watcher calls.
Parameters
|
function Timeout(const ATime: Longint): IPathWatcher; |
|
Sets maximum timeout in milliseconds to call the watcher run callback. Every time run is called this timer is reset. If the maximum timeout is reached TPathWatcher is terminated. Default value is 3600 seconds or 3,600,000 milliseconds.
Parameters
|
function Run(const AWatcherRun: TWatcherRunCallback): IPathWatcher; |
|
Defines the callback procedure that should be executed when a change is detected.
) Parameters
|
function Start: IPathWatcher; |
|
Start watching the path considering the ignore parameters that have been configured. As soon as a change is detected the callback routine will be called. |
Generated by PasDoc 0.16.0.