I’m looking to create a program in C++ that allows a client to essentially mount a server’s directory, and than use that directory and the files it contains as-if they were stored locally.
The server would be run on linux, but the client could be either linux or windows. Although I don’t mind making it linux-only to begin with, as long as functionality can be added to support windows clients as well without rewriting alot of code.
How would I go about creating something like this? I have learned quite a bit about sockets over the past few weeks, and I’m assuming it plays a role, but I have yet to find out how to allow for mounting a directory, and then executing certain actions when something happens to a file within that directory.
As an example, when a user saves a file, the server should be able to, in addition to saving the file, also create a timestamped backup of said file in another directory.
Where do I go to get started on learning how to do this?
Under Linux modern desktop environments already include this kind of functionality. Using mount and fuse you can also mount most network filesystems available today.
If you decide to still go ahead and do this I guess what you would need choose on what level you are going to make an abstraction. Would it suffice to have desktop environment abstraction, like making a kioslave in KDE, that would limit you to KDE applications as users. Or should you go for the FUSE module, that would work on a filesystem level and work with all applications of course lacking slick the UI integration of kioslaves.
Under Windows I think your only approach would be to use the Virtual File System api provided, I can swear I have read about things like this recently but I cannot find it. I belive an explorer integration could also be made but I am not sure.