I would like to be able to give the impression of the presence of files and directories (e.g. the ls command should list them, or the cd command should make directory navigation possible), but redirect read, write, delete, ... commands to a program which handles them (and for example stores, returns, deletes data of a database instead). Is this possible?
It's possible if you write your own filesystem driver. The easiest approach would be to use FUSE which allows you to write drivers in userspace (much, much safer and easier than writing a kernel driver).
There's a hello world driver example to get you started.
There's also a page on their Wiki about Database filesystems that you should look at.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With