User`s guide

KwikNet Virtual File System
K
A
DAK
239
7. KwikNet Virtual File System
7.1 Introduction
For embedded systems which may not need a full-featured file system, KwikNet offers a
Virtual File System (VFS) which can provide access to a limited set of read-only files
built into the application.
A virtual file is a duplicate of a real disk file which you have on your development
system. However, the virtual file does not reside on a disk. Instead, it sits in the memory
of your target system.
Virtual files are created using the
KwikNet VFS Generator, a utility program which
executes on your development system. You create a simple text file which defines the set
of real disk files which are to make up your Virtual File System. The VFS Generator
reads this description and produces a C source file which, when compiled and linked with
your application, forms your Virtual File System.
You can also use the VFS Generator to compress text files thereby reducing the memory
required for your VFS image. Such compression is especially suitable for HTML files
which contain frequently repeated HTML tags.
The Virtual File System can be used with or without a real file system. It will forward
file requests which it is not equipped to handle, through the KwikNet Universal File
System Interface to the underlying file system, if one exists. For example, if you are
using the VFS with the AMX/FS File System, a file will be fetched via AMX/FS if it is
not first found within the Virtual File System.
VFS File System Structure
The Virtual File System consists of a set of files organized into one or more volumes. In
most applications, all files are contained in a single volume. If you wish to support
multiple volumes, refer to Chapter 7.4.
The Virtual File System provides a hierarchical directory structure to allow virtual files to
be organized into directories as in a conventional file system. However, it does so
without actually maintaining directories.
The Virtual File System does not include any services for manipulating directories. For
example, you cannot create or delete directories. Furthermore, the VFS has no concept of
a current working directory.
The Virtual File System does not support the concept of a disk drive such as the
conventional MS-DOS
®
disk drive identified by a drive letter such as C:. Hence there is
no such concept as the current drive. However, the VFS file naming rules do allow files
to be grouped as though drives are supported.