As you know, Windows supports offline/online files now. In the other words, file content can be hosted in cloud, but the file info is hosted on a local machine and apps thinks that the file is actually here. However I found a problem here. I have some files in the onedrive folder and I do some synchronization with local files (outside onedrive folder). When file is offline (content of the file is on local machine) there is no problem with comparing the file modification time with file copy hosted on the machine (outside onedrive folder). However, if the same file is online only (content of the file is in onedrive cloud), modification time is different! For example:
Local machine <> OneDrive
128 809 273 928 753 750 vs 128 809 273 920 000 000
128 809 274 038 597 500 vs 128 809 274 030 000 000
Clearly visible that there is a time resolution problem. Looks like onedrive have 1sec. resolution, but NTFS file 100 nanoseconds.
So, any ideas how to deal with it? Of course, I can check FILE_ATTRIBUTE_OFFLINE
and decrease resolution of time of the checked file. However it doesn't looks good for me.