How use DokanFileInfo->IsDirectory ??

116 views
Skip to first unread message

Salamoun

unread,
Jan 31, 2011, 12:34:55 PM1/31/11
to Dokan
Hello,
I am playing with dokan and mirror example.
I am wondering how DokanFileInfo->IsDirectory is working.

DokanFileInfo->IsDirectory almost always returns 0, even if this is a
folder.

When I enable logging and try to delete folder with name "FOLDER" a
get this:

CreateFIle DokanFileInfo Context: 3756664, fileName: \FOLDER,
filePath: C:\test\FOLDER, isDirectory: 0
Cleanup: \FOLDER, isDirectory: 0
Cleanup: \FOLDER, isDirectory: 1
Cleanup: \FOLDER, isDirectory: 1

For the first call isDirectory is false and than it's true.
How I can detect if it is file or directory?
Thanks for help.

Smurf IV

unread,
Jan 31, 2011, 1:11:06 PM1/31/11
to do...@googlegroups.com
You have to set it when you detect that what is attempting to be opened via "CreateFile" is actually a directory.
This is then returned and stored in the context that will be passed back to you in future calls.


--
You received this message because you are subscribed to the Google Groups "Dokan" group.
To post to this group, send email to do...@googlegroups.com.
To unsubscribe from this group, send email to dokan+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/dokan?hl=en.


tim matthews

unread,
Apr 14, 2011, 4:54:01 AM4/14/11
to do...@googlegroups.com
The README states that the CreateFile function does not need to modify IsDirectory (search for "see exceptions below" within it). Is the response above incorrect in stating otherwise or does the README need updating?

Ramesh Kumar

unread,
Apr 25, 2011, 1:14:31 AM4/25/11
to do...@googlegroups.com
Hi,

you have to set isDirectory = true when you found  folder from fileattribute in the FindFile method. Hope this is help you.

//Ramesh

On Thu, Apr 14, 2011 at 2:24 PM, tim matthews <tim...@gmail.com> wrote:
The README states that the CreateFile function does not need to modify IsDirectory (search for "see exceptions below" within it). Is the response above incorrect in stating otherwise or does the README need updating?

--
You received this message because you are subscribed to the Google Groups "Dokan" group.
To post to this group, send email to do...@googlegroups.com.
To unsubscribe from this group, send email to dokan+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/dokan?hl=en.



--
Thanks & Regards

 Ramesh S,
Reply all
Reply to author
Forward
0 new messages