It is convenient to access all of the application's resources as if they all were in the same folder tree, no matter where they actually come from—from an actual file, a .zip
archive on disk, or an in-memory archive downloaded over a network. Let us implement an abstraction layer for this kind of access.
We assume that the reader is familiar with the concepts of NTFS reparse points (http://en.wikipedia.org/wiki/NTFS_reparse_point), UNIX symbolic links (http://en.wikipedia.org/wiki/Symbolic_link), and directory mounting procedures (http://en.wikipedia.org/wiki/Mount_(Unix)).
Our folders tree will consist of abstract mount points. A single mount point can correspond to a path to an existing OS folder, a
.zip
archive on disk, a path inside a.zip
archive, or it can even represent a removed network path.class iMountPoint: public iObject { public: