Getting files timestamps

17 views
Skip to first unread message

alex Sec

unread,
Dec 10, 2019, 6:42:19 AM12/10/19
to Dokan
Hi Everyone,
I am developing an application which is using Dokan, I manage to get familiar with the internals of it, however, as far as I have seen I haven't found a way to get access to the file information for a file which is getting copied into the virtual drive (through Explorer).
My final goal would be to get access to the file timestamps (of the original file) in order to be able to keep them for the file that gets created in the virtual drive, instead of having all the timestamps set to the current time.
If I am not wrong such information are not provided from the dokan callbacks which are managing to "copy" the file, as neitther the handler to the original file is kept (as stated here https://groups.google.com/forum/#!topic/dokan/PPpjEZ12458).
So this means there is not an easy way to do so, or am I wrong? Thank you in advance

Liryna

unread,
Dec 10, 2019, 7:35:27 AM12/10/19
to Dokan
Hi Alex,

Unfortunately only explorer knows the current file location. For dokan, we only see the request for a new file with data and set information (timestamps). We have no knowledge from where this data comes from (else than explorer pid).
You might go with a shell extension to hook the file copy operation

Best regards,
Liryna

alex Sec

unread,
Dec 10, 2019, 8:15:46 AM12/10/19
to Dokan
Hi Liryna,
thank you very much for your quick reply, unfortunately I was foreseeing this, so thanks for your advice, I will try this way.
Regards,
Alex
Reply all
Reply to author
Forward
0 new messages