3 ms·
> FileSystemWatcher That's a .Net contraption over one of two Win32 APIs that provide file system monitoring services. Neither of these requires opening files
by huhtenberg 12y ago
> FileSystemWatcher
That's a .Net contraption over one of two Win32 APIs that provide file system monitoring services. Neither of these requires opening files in response to file system notifications. That's 100%, guaranteed.
Correct me if I wrong but Dropbox is not written in .Net, so what you said is irrelevant.
--
APIs in question:
[1] https://msdn.microsoft.com/en-us/library/windows/desktop/aa364417%28v=vs.85%29.aspx https://msdn.microsoft.com/en-us/library/windows/desktop/aa3...
[2] https://msdn.microsoft.com/en-us/library/windows/desktop/aa365465%28v=vs.85%29.aspx https://msdn.microsoft.com/en-us/library/windows/desktop/aa3...
- tallanvor 12y agoI'm not sure if Dropbox is managed code or not. FileSystemWatcher does implement ReadDirectoryChangesW, which would allow them to set specific directories to watch. They may be using change journals instead, though, which function differently. Either way, I'm fairly certain that checking file properties (as would be done to check whether or not a filter applies) would be registered as opening the file.
- huhtenberg 12y agoChange journals are read from the volume directly and there's no evidence in the ProcMon logs (posted elsewhere here) that Dropbox uses them. > I'm fairly certain that checking file properties (as would be done to check whether or not a filter applies) would be registered as opening the file. Bzzt, nope. Wrong again. You should really try and not comment on things that you are not well-versed at. This part in particular - "as would be done to check whether or not a filter applies" - makes no sense. Dropbox has the file path readily available from the notification itself [1], and that's the only thing they need to look at to determine if the file is in their managed directory or not. [1] https://msdn.microsoft.com/en-us/library/windows/desktop/aa364391%28v=vs.85%29.aspx https://msdn.microsoft.com/en-us/library/windows/desktop/aa3... Point being that the app does not need to open files when processing file system notifications, which is what you stated in the top comment.
- geofft 12y agoAnd how, precisely, do you expect someone to become well-versed in something while trying not to comment on it?