問題描述
Dropbox如何監控? (How does dropbox monitoring?)
Which mechanism does Dropbox use to monitor the folders? I am interested in the mechanism supported by a programming language, by operating systems or some file system functionalities.
參考解法
方法 1:
There are a number of options you may want to consider:
- Java has a WatchService
- .NET has a FileSystemWatcher
- Flavors of Linux can use inotify
- Windows native has FindFirstChangeNotification
- You can implement a custom file system using FUSE
- OP also pointed to Apache Commons IO's solution for Java.
Some info used from this SO question.