Table of Contents

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

onStart Action<string, bool>

Action to invoke when file monitoring starts

onStop Action<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

path string

The folder path to start monitoring

Stop(string, bool)

Stops monitoring the specified folder

public void Stop(string path, bool isFromFileSystemWatcher = false)

Parameters

path string

The folder path to stop monitoring

isFromFileSystemWatcher bool

Indicates if this was called from FileSystemWatcher event