User`s guide
KwikNet Virtual File System
K
A
DAK
257
7.4 Multiple VFS Volumes
The KwikNet Virtual File System usually consists of only one volume. However, the
Virtual File System can be extended to include additional volumes. In fact, since virtual
files cannot be dynamically created, adding a volume is the only way that a virtual file
can be added to the file system at run time.
Do not be fooled by the fact that one volume can be represented by several VFS Data
Files. The fact that the virtual files reside in more than one VFS Data File does not alter
the fact that, collectively, they make up a single VFS volume.
A volume is a Virtual File System constructed using the VFS Generator. By default, the
VFS Generator assigns the volume name kvfs_primary to each volume which it creates,
making that volume a primary VFS volume. You must have one, and only one, primary
VFS volume. Any additional VFS volumes are called secondary volumes.
When using the VFS Generator to create a secondary volume, you must use the -v
command line option or the ...VOLUME directive in your VFS Definition File to give your
secondary volume a unique name. You can create as many secondary volumes as you
require as long as the volume name of each volume is unique.
When
KwikNet is started, it initializes the Virtual File System if it is included in your
KwikNet Library. Only the primary VFS volume is made ready for use. It is up to your
application to add your secondary VFS volumes after KwikNet is operational.
Your application can add a secondary volume to the Virtual File System at run time using
VFS service procedure kvf_voladd(). Your secondary volume is added at the end of all
other volumes present in the Virtual File System at the time of addition. Note that virtual
files are accessed according to the order of the volumes which contain them. Hence, a
virtual file in the primary volume will take precedence over another virtual file with the
same name appearing in a secondary volume.
Your application can also delete a secondary volume from the Virtual File System at run
time using VFS service procedure kvf_voldel().
Warning
KwikNet and your application tasks must NOT be using the
Virtual File System when your application attempts to add
or delete a secondary volume.