Giter VIP home page Giter VIP logo

Comments (17)

Liryna avatar Liryna commented on August 30, 2024

Yes, you can do it by using a path folder as mount point.
Like :mirror.exe /r C:\Users /l C:\MyMountPoint

from dokan-dotnet.

Albeoris avatar Albeoris commented on August 30, 2024

Thank you very much!

from dokan-dotnet.

Albeoris avatar Albeoris commented on August 30, 2024

It's working!
One more question: can I use a file as a mout point and describe a virtual file system as one file?

from dokan-dotnet.

Liryna avatar Liryna commented on August 30, 2024

Good news !
😢 No impossible

from dokan-dotnet.

Albeoris avatar Albeoris commented on August 30, 2024

It is sad. :(
I try to replace the contents of a file on the fly.
If I know, the hard link to the virtual file system instead original file will not work too?

from dokan-dotnet.

Albeoris avatar Albeoris commented on August 30, 2024

Yeah. :(
"The system cannot move the file to a different disk drive."
If you will have any thoughts around this subject that tell me please!
And thanks again for your help!

from dokan-dotnet.

marinkobabic avatar marinkobabic commented on August 30, 2024

Maybe you want to use a folder as mount point?

from dokan-dotnet.

Albeoris avatar Albeoris commented on August 30, 2024

@marinkobabic
Yes, now I am on this way. But it's crooked workaround because I need to replace content of a single file (a custom reparse point?) instead of the entire folder.
https://i.imgur.com/PpTXdN9.png

from dokan-dotnet.

Albeoris avatar Albeoris commented on August 30, 2024

Hm. Another thought:
If I understand correctly, dokany uses a filter driver of file system?
Can it work just as filter as alternative of mount? Like that:

IDokanOperations myHandler = new MyHandler();
Dokan.Filter(myHandler, "D:\SomeFolder");

class MyHandler() : IDokanOperations 
{
  ...
  public NtStatus CreateFile(string fileName, FileAccess access, FileShare share, FileMode mode, FileOptions options, FileAttributes attributes, DokanFileInfo info)
        {
            if (fileName != @"SomeFile.bin")
                return DokanResult.NotHandled;

            info.Context = new FileStream(@"C:\OtherFile.bin", mode, access, share, 4096, options);
            return DokanResult.AccessDenied;
        }
  ...
}

Is it possible?
Excuse me if I say stupid things, I have no idea about how work kernel level programs.

from dokan-dotnet.

marinkobabic avatar marinkobabic commented on August 30, 2024

Let me try to understand what you are trying to achieve.

If you would like to control access to a specific file which already exists on the NTFS file system or FAT etc. then you should write your own minifilter.

Dokan is a filesystem like NTFS or FAT.

from dokan-dotnet.

Liryna avatar Liryna commented on August 30, 2024

@marinkobabic is right, dokan does not give you the choice. You have to handle everything that is happening in the mounted device or folder.

from dokan-dotnet.

Albeoris avatar Albeoris commented on August 30, 2024

@marinkobabic, yes you are right. My question how this behavior is different from what Dokany doing?

@Liryna, probably, the answer was meant for me? Is it difficult to implement using Dokany as a basis?
Or is it completely different drivers and what I described above can not be solved by 10-20 lines of code in the driver?

from dokan-dotnet.

Liryna avatar Liryna commented on August 30, 2024

I forgot a word yes 😄 I wanted to say that he is right.

totally different driver unfortunatly 😢

from dokan-dotnet.

Albeoris avatar Albeoris commented on August 30, 2024

Miserably. :(
Understood, thanks! I will try to write my own driver or focus on virtualization entire folder. :)

from dokan-dotnet.

marinkobabic avatar marinkobabic commented on August 30, 2024

Like Liryna said that would be a total different driver you have to write. It's a minifilter driver and there are a lot of people on the web doing this. Also Microsoft provides templates and examples.

As a filter driver you can decide to pass the request down to lower driver or to handle it your self.

There is no way to avoid kernel debugging and start to learn how to manage the os request. www.osronline.com is a good place for your questions when you once start to write the code.

Dokan is a virtual file system. We handle all the request for our mointpoints and pass them to usermode application which returns the response to the dokan driver.

from dokan-dotnet.

marinkobabic avatar marinkobabic commented on August 30, 2024

Dropbox and OneDrive are implemented based on shell extensions. This approach is complicate because of missing documentation and examples.

Your options are:

Minifilter driver or virtualize folder using dokany

from dokan-dotnet.

Albeoris avatar Albeoris commented on August 30, 2024

@marinkobabic, thank you! I found many examples, try to implement now. (=

from dokan-dotnet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.