Hack Forums
[C#] Create virtual drive with virtual file system ?? - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [C#] Create virtual drive with virtual file system ?? (/showthread.php?tid=5387699)



Create virtual drive with virtual file system ?? - severos - Aug 27, 2016

I'm looking for a way to create a drive that can be seen by windows just as any disk partition (C/D/E/etc...), however it's not mounted to some directory or file, but generated by code.
For example if I'm to make a G drive that connects my google drive account (Just for the sake of example), when I mount it at start up it'll ask for login credentials (or read from config), and login to google drive. When I open the drive it'll fetch my base directory on google drive and show me what files/folders there (without storing anything local), when opening a file it'll fetch it then open.
Same concept would be if I'm making some encrypted file system, I just save it all on normal drive hidden somewhere, and when user wants file he mounts it and interacts normally, in the background it's decrypting files, giving them to user, and receiving files from user then encrypting them and flush to disk storage).

How would I go doing such thing ??? I found a solution called Callback File System (CBFS), which isn't something I'd like to have for my projects.


* - Vinnilia - Aug 27, 2016

Are you looking to build this yourself in C# or are you looking for an already existing program?


* - severos - Aug 27, 2016

(Aug 27, 2016 01:42 AM)Vinnilia Wrote:  Are you looking to build this yourself in C# or are you looking for an already existing program?

If there's a pre made program that will trigger events like opening a folder/file, mounting and unmounting and such, then I'll probably use it as long as it satisfies the other conditions of system seeing it just like any other partition. Otherwise I don't mind writing it my self but that can take sometime to learn and get something working for good.


* - Assault - Aug 27, 2016

Try the lib called `Dokan` maybe?
https://github.com/dokan-dev/dokan-dotnet


* - severos - Aug 27, 2016

(Aug 27, 2016 02:08 AM)Assault Wrote:  Try the lib called `Dokan` maybe?
https://github.com/dokan-dev/dokan-dotnet

Reading the docs right now to see it, just too crappy internet to finish fast :/
I remember reading the name but the domain I got has expired so thought project was closed, didn't know it was open source.