Class FileSystemWatchers
- Namespace
- SunamoFileSystem
- Assembly
- SunamoFileSystem.dll
File system watcher for monitoring file changes in multiple directories
public class FileSystemWatchers
- Inheritance
-
FileSystemWatchers
- Inherited Members
- Extension Methods
Constructors
FileSystemWatchers(Action<string, bool>, Action<string, bool>)
Initializes a new instance of the FileSystemWatchers class
public FileSystemWatchers(Action<string, bool> onStart, Action<string, bool> onStop)
Parameters
onStartAction<string, bool>Action to invoke when file monitoring starts
onStopAction<string, bool>Action to invoke when file monitoring stops
Methods
Start(string)
Starts monitoring the specified folder for file changes Checks whether folder is already being monitored Is called from ProcessFile
public void Start(string path)
Parameters
pathstringThe folder path to start monitoring
Stop(string, bool)
Stops monitoring the specified folder
public void Stop(string path, bool isFromFileSystemWatcher = false)