Updated 2018-09-21 21:19:03 by dbohdan

20040612 CMcC:

[package vfs::cache] is a vfs::add with the additional property that writes go to the top level directory.

[package vfs::add] allows one to stack directories together translucently, as if each directory were mounted over those below it, allowing the unique files below it to appear as if in the single virtual directory, giving the perfect illusion of a single directory composed of the sum of all of the stacked directories.

This code is at http://sharedtech.dyndns.org/~colin/cachevfs.tar.gz and contains man pages, tests and everything necessary to place it in the VFS distribution.

It is tempting to suppose (although not tempting enough for me to rigorously try it out :) that one could place a cache vfs in front of a wikit vfs stacked on top of an http vfs and get a local copy of a wikit which mirrors a remote copy, except for modifications. - 20040613 CMcC

Interesting idea! Another idea for using this vfs is for modifying starpacks while running the starpack. On windows modifying an executing file is not allowed. Using cache vfs the writes could go to a separate mk4vfs file (or any other vfs type) and as long as that second vfs is remounted each time using cache vfs, then the changes will take effect. And the same concept can be used for any readonly situation, such as files contained on a CD. - Brian Theado

See A collate/broadcast virtual filesystem for a more general solution to this problem - CMcC