简体   繁体   中英

How to exclude some folders when using filewatcher in c#?

everyone, I recently wrote a program wanting to monitor the whole file system. I use FileSystemWatcher class in c#. In order to watch the whole filesystem, I set IncludeSubdirectories to true. However, I also want to exclude three folders in monitoring. I would like to know is there any way to exclude folders? Thanks in advance!

不幸的是,您仅可以包括,如果需要排除,则可以在FileSystemWatcher Event Handler内部进行处理。

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