I'm creating an application for changing file metadata. I'd prefer that metadata edits not affect a file's modified date, so I'd like to suppress modification-date changes by doing this:
FILETIME ft = { 0xFFFFFFFF, 0xFFFFFFFF };
SetFileTime(hFile, NULL, NULL, &ft);
The only downside is that this apparently results in ReadDirectoryChangesW
not being triggered, so changes don't sync over something like Dropbox. I was wondering if there's a way to suppress the modification-date changes but also to artificially trigger ReadDirectoryChangesW
so that modifications register. In other words, to have the best of both worlds. Is that possible? Thank you very much for any info.
No, you cannot artificially trigger ReadDirectoryChangesW()
, especially if you are not the listener. ReadDirectoryChangesW()
is monitoring the filesystem itself, so only real filesystem events will trigger it.
User contributions licensed under CC BY-SA 3.0