This question doesn't sound trivial, but I'll give it a try.
What I need to do, is to create a virtual filesystem and mount it as if it was an hard drive. When my application starts, a new hard drive should appear in the list of available devices. Now, I need that drive to be virtual. In particular, I need to be able to generate the content in a dynamic way.
Basically, I would want to be able to:
- import some magic library
- register the callbacks for, like, list folder, get the content of this file at these bytes, and so on
- run my program
- a new drive appears, and when I do an ls, it's my program that answers that ls via a callback
Is this even possible? In principle, I should be able to simulate a drive, but I wouldn't even know where to start.