What steps will reproduce the problem?
1. I am using Dokan.NET 0.2.0 in windows 2008.
2. In function GetFileInformation, i update the values like create
time,access time and modified time of out parameter(i.e. FileInformation
fileinfo) with my own informations, the values i updated are not
reflected on windows application.
3. If i retrieve the informations from applications like explorer, command
prompt , it gives current system date and time for create, access and
modified time.
What is the expected output? What do you see instead?
Value of access,create n modified should have the values i gave and not the
current system time.
What version of the product are you using? On what operating system?
Dokan-0391191x86, Dokan.NET 0.2.0 in windows 2008.
Please provide any additional information below.
Its a c# code
In GetFileInformation function
/* code snipet */
fileinfo.CreationTime = DateTime.FromFileTime(value from my source);
fileinfo.LastAccessTime = DateTime.FromFileTime(value frm my source);
fileinfo.LastWriteTime = DateTime.FromFileTime(value from my source);
Value from my source is of type long(64 bit).
Well the thing is that i have debugged my code and checked if the values
are properly assigned and i found that fileinfo.CreationTime,
fileinfo.LastAccessTime and fileinfo.LastWriteTime has the values that i
have assigned. So i suppose that it should reflect the values i assigned
when retrieved from windows applications like explorer(right-click n click
property), command prompt etc. but it gives current date and time only.
i tried with the sample code you distributed “DokanNetMirror” in which u
mounted a local drive through dokan, and even in this case, it does not
reflect the values i gave to creation, access and modified time.
/* here is the code snippet */
FileInfo f = new FileInfo(path);
DateTime d1;
long tim;
tim = 128687193710000000; /* Hard coded value i gave */
d1 = DateTime.FromFileTime(tim);
fileinfo.Attributes = f.Attributes;
fileinfo.CreationTime = d1;
fileinfo.LastAccessTime = d1;
fileinfo.LastWriteTime = d1;
fileinfo.Length = f.Length;
return 0;
The hard coded value is 10/17/2008 5:46:11pm and it properly gets stored in
fileinfo.CreationTime, fileinfo.LastAccessTime and fileinfo.LastWriteTime.
but when i retrieve these informations through explorer and command prompt
it gives the actual time of the file and not the one i have provided.