Diversion: the TENEX Disk File
For those not familiar with the TENEX file system, a brief dissertation is included here to make the rest of the implementation meaningful.
A TENEX disk file consists of four things: a pathname, a page table, a (possibly empty) set of pages, and a set of attributes.
The pathname is specified in the RETR or STOR verb. It includes the directory name, file name, file name extension, and version number.
The page table contains up to 2**18 entries. Each entry may be EMPTY, or may point to a page. If it is not empty, there are also some page-specific access bits; not all pages of a file need have the same access protection.
A page is a contiguous set of 512 words of 36 bits each.
The attributes of the file, in the FDB, contain such things as creation time, write time, read time, writer's byte-size, end of file pointer, count of reads and writes, backup system tape numbers, etc.
NOTE: there is NO requirement that pages in the page table be contiguous. There may be empty page table slots between occupied ones. Also, the end of file pointer is simply a number. There is no requirement that it in fact point at the "last" datum in the file. Ordinary sequential I/O calls in TENEX will cause the end of file pointer to be left after the last datum written, but other operations may cause it not to be so, if a particular programming system so requires.
In fact both of these special cases, "holey" files and end-of-file pointers not at the end of the file, occur with NLS data files. These files were the motivation for the new TYPE.