SpartaDOS X Reference Manual |
Technical Information |
C h a p t e r 7 — Technical Information |
Directory Structure
The directory is a special file that
contains information about a group of files and subdirectories. Each
directory entry is 23 bytes in length and contains the file name,
time/date, length, the number of the first sector map, and the entry
status. The first entry is different from the others; it contains
information about the directory itself. The following is a list of this
information given as offsets into the first entry: |
|||||||||||||||||||||||||||||||||||||||||||||||||||||
When a directory is opened in unformatted or raw mode (see Programming With SpartaDOS X) the file is positioned to the second entry (that of the first file or subdirectory). To read the first entry you must POINT to the beginning of the file after opening it. The rest of the directory entries are the same. They are 23 bytes long and provide the following information (given as offsets into the entry):
Notes: bits 1 and 2 are not supported by earlier versions of SpartaDOS. Bits 3 and 4 should always be opposites. Bit 5 should never be changed! A status byte of 0 indicates the end of the directory. Bits 6 is not used and should not be, since it may be cleared as other operations are performed.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||
Exploring Disks | The best way to become familiar with the SpartaDOS disk format is to use a sector editor and a test floppy to explore. DiskRx, the SpartaDOS disk editor included in the SpartaDOS Toolkit, is an excellent sector editor tailored specifically for SpartaDOS disks. It will identify boot, bit map, sector map, directory, and data sectors. A good understanding of SpartaDOS disk structure and DiskRx can prove to be invaluable for recovering files from disks with bad sectors or damaged directories. Exploring disks can also be a lot of fun. |
Previous page |
Next page |