private void initializeWatcher(string path, string filter = "*.pdf") { //If watcher is null, we create a new instance. watcher = watcher ?? new FileSystemWatcher(); watcher.Filter = filter; watcher.Path = path; watcher.NotifyFilter = NotifyFilters.FileName; watcher.Changed += OnChanged; watcher.Created += OnChanged; watcher.Deleted += OnChanged; }
watcher.NotifyFilter
/* Watch for changes in LastAccess and LastWrite times, and the renaming of files or directories. */ watcher.NotifyFilter = NotifyFilters.LastAccess | NotifyFilters.LastWrite | NotifyFilters.FileName | NotifyFilters.DirectoryName;
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)