-- Introduction

Dasselbe auf Deutsch

Image Filing Systems


LayerFS is based on a very unique feature of the RISC OS filing system: The concept of an image filing system. An image filing system provides objects that behave exactly like a normal directory to the user (and in fact to any program, if desktop based or not), but has a different method to store data. Typical examples of such images are partitions or discs in a foreign storage format (DOS-FS, etc.), archives that transparently compress data written to and decompress data read from them (e.g. SparkFS, TBA-FS).

LayerFS is such an image filing system. So, an LayerFS image (LayerDir), with the symbol can be used like any directory. Its data handling concept is simply to read and store the data somewhere else.

From Links to Layers


The simplest example is known as link: a directory doesn't really contain data, but just points to a different directory. This is a useful facility for data organisation; for example a directory $.Tools.Graphic could be just a link to $.Graphics.Tools, so that a user will find the same directory either way he searches. The user can open a directory display of $.Tools.Graphic, read and modify files and subdirectories within; but in fact he sees, reads and modifies the files, applications and subdirectories in $.Graphics.Tools.

But LayerFS goes one step further, and that's where layers come in: a LayerFS directory doesn't just point to one other directory, but constructs itself from several source directories, where objects (files, applications and directories) in the 'lower' directories are hidden (overlaid) by objects of the same name in the 'higher' directories.

The Writing Path


The topmost of the building directories is the only one where data are written to. This does not only mean that new objects are always created in this writable directory, but also if existing files from deeper directories are to be modified, the file is re-created in the writable directory and the modification is applied there. As the writable directory sits on top of the directory stack, the modified file is always the object visible in the resulting LayerFS directory. As such, a LayerDir behaves much like a stack of transparencies.

The overall effect is that you have a directory where applications can read from and write to as they wish, although the majority of data files is in fact located on a read-only medium.

Examples


Apart from the links already described above, you can use LayerFS for a number of applications. Here are some examples:

Updatable Software Archives

If huge programs or resource archives are distributed on CD ROM, every modification of the data, e.g. a program update or slight modification of the stored resources, becomes a problem. Normally, you will then have to copy all the resources you want to use onto your harddisc. Some programs won't run if they are not copied to a writable location. This is a waste of harddisc space that can be easily avoided with LayerFS.

Compilation of update distributions

Programmers often want to distribute updates for their applications without re-sending the whole software package. If you apply the changes to in a LayerFS directory (a reading path pointing to the original), you can directly copy the files for the update out of the writable directory. You can even test changes to your application without having to make a full copy.

Incremental Backups

Taking complete backups of harddiscs etc. takes a lot of time and space on the media. Therefore, one usually prefers to do short-term backups by only copying modified files to a different medium than the last total backup. Such incremental backups can be done using LayerFS and the normal copy function of the RISC OS filer.


LayerFS Pro

This version of LayerFS consists of a special edition of LayerMgr and a freely distributable LayerFS modules that only can work with images generated by the Pro manager.

The LayerFS modules you get with personal copies can read both normal images and Pro images.

As the module is free, you can download an archive right here with the module and a very simple test structure. A more advanced example you'll find on our web pages: the shareware distribution of Units is now (after 12 Jan 1999) done with a LayerFS structure!

Download test structure, 34kB


© 1998 Feldner & Braun Software GdbR