简体   繁体   中英

what is the exact time that FileSystemWatcher raise Changed event

I would like to understand the following: FileSystemWatcher raise Changed event when I open file and change it or just when I save the file after I change it?

If I using FileStream the change event will raise only when I do: fs.Close();

As far as the file system is concerned, a file is not "changed" until it is saved. If you open a text file in a word processor (from Notepad to Word) and start typing, the file hasn't actually "changed" yet; only the in-memory representation of the file that is specific to the word processor has changed.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM