User`s guide
KwikNet Virtual File System
K
A
DAK
241
VFS File Operations
The Virtual File System provides a set of file access functions with names of the form
kvf_xxxxx(). These functions, listed in Figure 7.1-1, are described in detail in Chapter
7.5. Function prototypes are located in header file
KN_FILES.H in the KwikNet TCPIP
installation directory.
Your application can use these functions to access virtual files or real files. If the
referenced file is not a virtual file, the request will be passed on to the equivalent function
in the underlying file system, if it exists. Otherwise, an error response will be produced.
Your application can use these functions even if your KwikNet Library has been
configured to exclude the Virtual File System. In such cases, the functions map to their
equivalent functions in the underlying file system, if one exists.
VFS Function Purpose
kvf_close * Close a virtual file
kvf_fsize * Fetch the size of a virtual file
kvf_open * Open a virtual file
kvf_read * Read from a virtual file
kvf_seek * Seek within a virtual file
kvf_tell * Determine the current position of the file pointer
in a virtual file
kvf_flush Flush a file
kvf_remove Remove (delete) a file
kvf_rename Rename a file
kvf_write Write to a file
kvf_isdir Check if filename is a directory
kvf_mkdir Make a directory
kvf_rddir Remove (delete) a directory
kvf_opendir Open a directory for listing
kvf_closedir Close a directory when finished listing
kvf_readdir Read next directory listing entry
kvf_isvfile *! Determine if a file is a virtual file
kvf_voladd *! Add a VFS volume
kvf_voldel *! Delete a VFS volume
Note * Supported by Virtual File System
! Not supported by Universal File System
Figure 7.1-1 KwikNet Virtual File System Functions