#: 5092 S12/OS9/68000 (OSK)
11-Jul-90 20:05:07
Sb: #5070-Reading OS9 directorys
Fm: James Jones 76257,562
To: George Hendrickson 71071,2003
There's not all that much to it. An OS-9 directory is a sequence of 32-byte
records, each containing either (1) NUL ($00) as the first byte, indicating an
entry that is not in use (when you delete a file, its entry in the directory is
marked inactive this way) or (2) a 29-byte file name, terminated by having the
MSB of the last character of its name set, and a 3-byte LSN for the file
descriptor sector of the file named in the first 29 bytes of the record.
If you're writing a utility to read directories, be sure to avoid endlessly
recurring by noticing the entries for "." and ".."! (This is the voice of
experience speaking! )
The file descriptor sector contains, among other things, owner, time of
creation and last modification, and file size.
The gory details are all to be found in the section on RBF (the Random Block
file manager) in the OS-9 Technical Manual.
|