What is the impact of a FileSystemWatcher on a hard drive?

前端 未结 2 1747
深忆病人
深忆病人 2020-12-21 12:14

I\'ve used FileSystemWatcher in the past. However, I am hoping someone can explain how it actually is working behind the scenes.

I plan to utilize it in an applicat

2条回答
  •  情话喂你
    2020-12-21 13:13

    The short answer is no. The FileSystemWatcher calls the ReadDirectoryChangesW API passing it an asynchronous flag. Basically, Windows will store data in an allocated buffer when changes to a directory occur. This function returns the data in that buffer and the FileSystemWatcher converts it into nice notifications for you.

提交回复
热议问题