dokan-dev / dokany

User mode file system library for windows with FUSE Wrapper
http://dokan-dev.github.io
5.27k stars 665 forks source link

noob questions about Dokany #919

Closed Busbar2297 closed 4 years ago

Busbar2297 commented 4 years ago

Environment

Check List

Description

I have very primitive questions regarding Dokany, I am starting in this and got some very basic questions:

Thanks.

Logs

Please attach in separate files: mirror output, library logs and kernel logs. In case of BSOD, please attach minidump or dump analyze output.

Liryna commented 4 years ago

Hi @Busbar2297 ,

Hope this answer your question.

Busbar2297 commented 4 years ago

Hi Liryna, thanks for your quick response, I started to get it after a while, Now what I understood from the mirror example: 1- When you mount a path it is virtually mapped into the virtual FS, so it is not a clone, it is link a shortcut to it. 2- changes are not replicated, IMHO you see what was reflected on the original drive into the virtual FS, right ?!

speaking about preventing certain extensions using the mirror example, it worked fine apparently i needed to rebuild the project in VS somehow, but I can see that actions are denied on the virtual FS not the actual FS, what if I want to modify read/write operations on the original FS without mounting a virtual FS, is it doable, or this is where the minifilters come into play ?!

Thanks.

Liryna commented 4 years ago

@Busbar2297 Yes the mirror is just a link even if a prefer to say that it replays the action. When a user or software do a CreateFile, the dokan API CreateFile is called and in the implementation we replay this CreateFile with the same parameters and return the status. The mirror do not subscribe to the original drive changes yet (that would be a great contribution!) so if you change something in the origrinal drive, you will not see it in the mirror unless you refresh the view. Just to be clear again, this is the mirror limitation and not Dokan limitation.

About your last question, yes thats where the minifilters comes into play :) Dokan cannot answer this need.

Liryna commented 4 years ago

@Busbar2297 let me know if you need further information and I will reopen the ticket.