有什么方法可以在 C# 中监控目录大小。我使用一个目录来缓存文件,但我想限制它正在使用的磁盘空间。(即删除文件以减少空间使用) 提前致谢。
最佳答案
专门看FileSystemWatcher.Changed Event
根据MSDN
The Changed event is raised when changes are made to the size, system attributes, last write time, last access time, or security permissions of a file or directory in the directory being monitored.
关于c# - 目录大小改变事件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9565474/