A few Dokan.NET questions

180 views
Skip to first unread message

AnyOldName3

unread,
Jan 9, 2017, 7:47:00 PM1/9/17
to Dokan
Hi,

I'm using Dokan.NET as part of my final year university project, and while I've got the majority of things working, I've got a few questions about some things I didn't expect, or don't quite understand. So far, the gist of what I've attempted to create is a read-only version of the directory mirror example, and despite much of what I've done not being an exact copy (for example, there were several cases where the example threw and caught exceptions as part of its normal behaviour, but I found alternate ways that seemed cleaner), it behaves almost perfectly.

Firstly, I'd like to know if the mirror example is feature complete and bug-free. If I'm basing parts of my system on it, then it wouldn't be ideal if it's going to inherit the mirror's limitations. Also, how many of the parts of the program which are throwing and catching exceptions for seemingly simple tasks like checking if a file or directory exists really have to be done that way? The only one I don't think I've found an alternative for is the one discussed in this issue, but it wouldn't be a good thing if I'd made my code look cleaner at the expense of stopping it actually working.

As for my system, I'm having some issues with the read-only-ness of things. As a completed version of my system may have the potential to switch between being read-only and writable once it's already mounted, so I'm not mounting it as write protected, but am just including ReadOnlyVolume in the FileSystemFeatures part of GetVolumeInformation. This doesn't seem to work as I'd expect, though. Only the files and folders in the root of the virtual drive seem to be labelled appropriately in Windows Explorer, meaning that the rename, and new file and folder buttons show up for anything deeper. I also tried ORing in ReadOnly into the attributes for everything in FindFiles and GetFileInformation, and this didn't stop that either (although I may have another bug there, too).

I did have further questions when I started typing this, but managed to figure out more debugging I could do, and have resolved that. I'm sure more will come up :P

Thanks for any responses.

Liryna

unread,
Jan 24, 2017, 3:37:56 PM1/24/17
to Dokan
Hi,

C# Mirror is not totally bug-free but can be used as example/base to start a FS.
It is stable and can run much of the cases needed for normal usage.

About improvement on C# Mirror, feel free to open a pull request with you changes. I would be happy to review and talk about the changes myself ! <3

About read only device, there is probably this issue that can answer some of your questions:
https://github.com/dokan-dev/dokany/pull/72

Best regards,
Reply all
Reply to author
Forward
0 new messages