Class FileSystemWatcher

My question is why when using the FileSystemWatcher Class to monitor while saving the excel file, the FileSystemEventArgs returns .Deleted? When monitoring a .txt file, this is .Changed

+3
source share
2 answers

I suppose: since Excel first creates a temporary file, writes information there, thereby deleting the original .xls file and renaming the temporary file.

Perhaps Excel guarantees that the original file will not be lost if the save operation fails.

+8
source

, Excel , . , , , "". Changed, Excel Deleted.

+3

Source: https://habr.com/ru/post/1757149/


All Articles