7.2.1 Details
To make difference between ZIP archives and physical disk directories
VFS uses a simple convention: directories end with a path separator
character (`$/') while archives do not. `$/' is a special
configuration file variable which represents the path separator on any
particular platform (see section 7.2.2 Configuration File (`vfs.cfg')). For example
`$/data' refers to an archive, while `$/data$/' refers to an actual
directory named `data'. Failure to understand this distinction is often
the major cause of errors; so if you're getting unexpected results check in
the first place if directories have trailing path separators.
There are several differences between filesystems between operating systems
that you should always keep in mind because VFS doesn't hide these
details from you. To avoid inconsistencies between different file systems you
should follow this list of guidelines:
-
Choose filenames that are well suited for all operating systems you are
targeting. As of today DOS has the most restricted rules for naming
files (8.3 file names with only ASCII7 characters except "?*+" and
space, and with only one dot per filename). VFS does not make any
attempt to mimic long file names on systems that does not support them.
Although some C compiler runtimes (for example, DJGPP) have limited
support for working with long filenames, they are automatically truncated to
8.3 creation and truncated before comparisons, in most cases this is enough.
The part of VFS that is located in archives support virtually any
filenames, so if you're sure that you will never have to place some file on a
"real" filesystem, you can give it any name you desire.
-
Different platforms use different filename comparison criteria. On Unix
filenames are case-sensitive, while on DOS, OS/2, Windows, and
Macintosh (HFS) they are case-insensitive. To avoid problems always refer to
files by their exact names. For example, if you have a file on VFS called
`GaMe.DaT' you should open it exactly as `GaMe.DaT' and not as
`game.dat' or `GAME.DAT'. On DOS, the file will appear to be
entirely upper-case `GAME.DAT', but you should still use the correct name,
`GaMe.DaT', when opening it.
-
Keep in mind that Unix can delete currently opened files while
DOS, OS/2, Windows and possibly others can not. So you should avoid
deleting open files. (Technical Note: Actually this should work for
files which are located in archives but is not advisable to do so--and has
not been tested.)
This document was generated
using texi2html