Hardware manual
3.5. Directory Access
Most user programs do not concern themselves with file pointers, but use system routines which go directly
from string names to streams. By a "file name" we mean a string which can be converted into a file
identifier by looking it up in a directory. File names are arbitrary Bcpl strings which contain only upper
and lower case letters, digits, and characters in the string "+-.!$". File names are stored in directories as
they are typed, but no distinction is made between upper and lower case letters when they are looked up.
Dots (".") are used to separate file names into
parts. If there is more than one part, the last part is called
the
extension, and is conventionally used much like extensions in Tenex.
There is an optional version number facility. It is not available in the standard release of the operating
system (NewOs.boot), but is available in an unsupported alternate version (NewOsV.boot). If the version
number facility is enabled, the interpretation of exclamation mark ("!") is special; if a file name ends with
a ! followed only by digits, the digits specify the file version number.
A
lookup name, presented to one of the directory functions given below, is usually a file name. However,
it may optionally specify the name of a directory in which to look for the file (or record the new file). The
lookup name is processed from left to right. If the character "<" appears at the head of the lookup name,
the system directory ("SysDir.") becomes the "current" directory; whenever the character ">" follows a
name, the name is looked up in the current directory and that file becomes the new current directory. If no
directory is specified in the lookup name, the "working directory" is assumed. Example: "<dir>fil." will
look up dir in the system directory SysDir, and will then look up fil in dir. Any illegal characters in a
lookup name are replaced with "-" characters.
File Versions: The file system also supports multiple versions of the same file; this feature may be enabled
or disabled when the operating system is installed. The version number is recorded by appending an
exclamation mark and the decimal version number to the file name; file names without version numbers
appended act as if they are "version 0." The OpenFile function uses lookup names and version control
information to locate a desired file. If the lookup name contains a version number (e.g., "Sys.Errors!3."),
then no version defaulting is done--the lookup operates on precisely the file specified. (This processing is
identical with versions enabled and disabled.)
If the lookup name does not specify a version number and file versions are enabled, then the
versionControl parameter specifies how defaulting is to be done (in the definitions, "oldest" refers to the
file with the "lowest" version number; "latest" refers to the file with the "highest" version number):
verLatest The latest version is used.
verLatestCreate The latest version is used. If the file does not exist, it is created
with version number 0 (i.e., no number will be appended
explicitly to the file name): this is to prevent needless
accumulation of version numbers in system-related files (.e.g,
.Run files).
verOldest The oldest version is used.
verNew A new file will always be created. A system parameter,
established when the system is installed, determines how many
old versions will be preserved. If that default should be
overriden, just add the desired number of versions to verNew,
e.g. a versionControl value of verNew+4 will create a new file
and retain at most three older versions.
This version option may reuse disk pages allocated for the oldest
version of the file, but the serial number and file name will of
course be changed. If (newest-oldest)+1 is greater than or equal
to the number of versions to keep, oldest is reused in this fashion
to become version newest+1. For example, if verNew is
specified, 2 versions are to be kept, and foo!2 and foo!3 exist,
Alto Operating System May 5, 1980 9
For Xerox Internal Use Only -- December 15, 1980










