FileSystemWatcher がイベントを複数回トリガーするようです。これが私の設定です。
watcher = new FileSystemWatcher();
watcher.Path = @"D:\testSpace";
watcher.InternalBufferSize = 1024*64;
watcher.Deleted += Triggered;
watcher.Changed += Triggered;
watcher.Created += Triggered;
watcher.Error += ErrorOccured;
watcher.NotifyFilter = NotifyFilters.LastWrite;
watcher.IncludeSubdirectories = true;
watcher.EnableRaisingEvents = true;
ドキュメントを変更すると、ドキュメント変更イベントが 2 回トリガーされます。
フォルダーの下に新しいファイルが作成されない限り、新しいフォルダー作成イベントはトリガーされません。
削除されたイベントが発生しませんでした(シフト削除も使用してみました)
これらの問題の回避策を知っていますか?