Some issues about using Dokan.NET.

260 views
Skip to first unread message

qili...@gmail.com

unread,
May 8, 2013, 11:53:06 AM5/8/13
to do...@googlegroups.com
Hi everyone, I am currently working on a small project that uses dokan.net to mount a net drive.
Here is my question.
I successfully mounted the drive(N:\), but none of the files are listed in the Windows browser.
I guess Dokan Operations process my request in this way:

(1) When I click N:\, CreateFile is called, "/" is open, and it return 0 to indicate success.
(2) Then GetFileInfomation and FindFiles are called. "/" will be marked as Directory. And the files under "/" are added to System.Collections.ArrayList files.
(3) OpenDirectory will be called. Return 0 to indicate success.

I successfully retrieve directory information from the server. Everything seems to be fine. I think the system should have recursively called "CreateFile" to list the files in Windows browser, but it didn't.
I don't know where I got it wrong.
How to show those files in Windows browser, any advice?

Thanks a lot.
-Qi Li

Adam Shumann

unread,
May 8, 2013, 12:42:13 PM5/8/13
to do...@googlegroups.com
Dokan is a beast to get working, You need to use fileinfo objects in
the arraylist.You can look at my basic implementation in
DokanDiscUtils as an example if you want, it is nowhere near a bug
free system but is operation. (Sorry about it being in VB, that was
before I learned C#)
http://dokandiscutils.codeplex.com/SourceControl/changeset/view/19253#108325

If I had to write this again, I would probably write a function to get
fileinfo to share between FindFiles and GetFileInfo (They do VERY
similar things)
> --
> You received this message because you are subscribed to the Google Groups
> "Dokan" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to dokan+un...@googlegroups.com.
> To post to this group, send email to do...@googlegroups.com.
> Visit this group at http://groups.google.com/group/dokan?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

qili...@gmail.com

unread,
May 8, 2013, 10:56:55 PM5/8/13
to do...@googlegroups.com
Totally agree with you.
ArrayList is a key value.
We put all fileinfo into this arraylist in function "FindFiles".
I think system will use this arraylist, right? Both in your project and the official example Register drive, I didn't see any code use this arraylist except adding fileinfo to it, 
Maybe some fileinfo I added to the arraylist is problematic, and the system skipped them.
Anyway, I will work on my project later, and when it's done, I can share my problem and solution.
Thank you for your attention.


在 2013年5月9日星期四UTC+8上午12时42分13秒,Adam Shumann写道:

Qi Li

unread,
May 9, 2013, 10:52:47 AM5/9/13
to do...@googlegroups.com, Huang, Zheng
This problem is solved now.
What I should have noticed:
(a) Single step debugging will interfere dokan and window fs.
(b) Every parameter should be set correctly, especially "last modified date", etc.
These parameters seems irrelevant but they really matters. I will go on working on my network protocol to retrieve those data correctly.
Dokan is fun :)
Thank you Adam.

--
You received this message because you are subscribed to a topic in the Google Groups "Dokan" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/dokan/H-wAUh-_u5g/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to dokan+un...@googlegroups.com.

Adam Shumann

unread,
May 9, 2013, 11:02:02 AM5/9/13
to do...@googlegroups.com, Huang, Zheng
No problem, I had forgotten about debugging breaking the code, thats
what all those log() lines are for in mine. :) log is an
Action<string> that allows me to easily repoint it to console, file
logging, or both.
Reply all
Reply to author
Forward
0 new messages