c++filesystemszipvirtualfilesystem

Virtual Filesystem with C/C++ under Windows


I am currently developing a game which simulates an operating system. Therefore i need an ingame filesystem. Currently, i am using zziplib to be able to load files from a zip archive, however this is a readonly "filesystem" and i need a way to write new files and serialize them afterwards (and deserializing them during the next execution)! Are there any useful libraries out there in the wild to be used or should i write one for myself based on any ones?


Solution

  • This is probably one of the places where using a simple database as a filesystem makes sens.

    Use something like sqlite to store the data (with paths as keys, blobs as data, or something like that).

    One of the advantages of doing this is that you don't actually have to worry about the storage, and you can use existing database tools to view/edit the data "offline" rather than having to write your own. (Plus you can store other game info in there as well.)