Comments (17)
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.
Thank you very much!
from dokan-dotnet.
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.
Good news !
😢 No impossible
from dokan-dotnet.
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.
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.
Maybe you want to use a folder as mount point?
from dokan-dotnet.
@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.
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.
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.
@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.
@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.
I forgot a word yes 😄 I wanted to say that he is right.
totally different driver unfortunatly 😢
from dokan-dotnet.
Miserably. :(
Understood, thanks! I will try to write my own driver or focus on virtualization entire folder. :)
from dokan-dotnet.
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.
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.
@marinkobabic, thank you! I found many examples, try to implement now. (=
from dokan-dotnet.
Related Issues (20)
- Cant Enable Only one OPEN Stream on a file HOT 1
- Is FileSystemSecurity affects something in GetFileSecurity method? HOT 2
- Does the driver have compatibility issues with server 2022? HOT 9
- [Help wanted] Random unmounts after updating from 1.5.0.0 to 2.0.5.1 HOT 2
- FILE SIZE HOT 10
- Locking the entire application on mount HOT 1
- error 0x800705AA Insufficient system resources exist to complete the requested service. HOT 1
- Folder Icon Change HOT 2
- How to disable virtual disk renaming? HOT 1
- DokanNetMirror does not return "." (self) and ".." (parent) directories in `FindFiles` HOT 20
- Encountered infinite recursion for setting SingleThread=false in DOKAN_OPTIONS HOT 1
- Remounted volumes are randomly unmounted after a few seconds HOT 9
- Hardcoded use of date/time and culture in ConsoleLogger HOT 5
- Identifying exact type of file info call from .NET wrapper HOT 6
- `ReadFile`: semantics of `bytesRead` HOT 27
- AccessViolationException in `RentBuffer` HOT 1
- Feature: Async HOT 3
- The volume label is incorrect HOT 2
- Feature: cancellation tokens HOT 1
- Don't know how to mount the DokanInstance... HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dokan-dotnet.