Class FileSystemWatcher
Starter that activates on file system changes.
public class FileSystemWatcher : BaseStarter, IStarter, IModel, IDisposable
- Inheritance
-
FileSystemWatcher
- Implements
- Inherited Members
- Extension Methods
Remarks
The starter is watching for any changes to files in a file system directory specified by the PROP_DIR_PATH
config. property.
The property PROP_FILE_NAME
can be used to narrow the files to be monitored in the directory. If empty
(or not specified) all files are monitored. Specify a complete file name or any wild card pattern like
'*.csv', 'data-*.xml', 'pos_???_record.*' to filter the files to be monitored for changes.
The actual changed file causing the starter to activate is set with it's full file path in the
activation/run property RPROP_FILE_PATH
Constructors
FileSystemWatcher()
public FileSystemWatcher()
Fields
PROP_DIR_PATH
Property name that specifies the path of the directory to monitore for changes.
public const string PROP_DIR_PATH = "Directory-Path"
Field Value
PROP_FILE_NAME
Property name that specifies the file name or file pattern to monitor.
public const string PROP_FILE_NAME = "File-Name"
Field Value
RPROP_FILE_PATH
Run-property name of the property set on job activation that specifies the full path of the detected file.
public const string RPROP_FILE_PATH = "Detected-File-Path"
Field Value
Methods
ChangeEnabledState(bool)
Changes the enabled state of the starter according to enabled
.
[SecurityCritical]
protected override void ChangeEnabledState(bool enabled)
Parameters
enabled
bool
Dispose(bool)
Dispose managed resources on disposing
== true.
protected override void Dispose(bool disposing)
Parameters
disposing
bool
InternalInit()
Internal starter initialization.
protected override IStarter InternalInit()