FileEntry TMEX Type Group

typedef struct {
   unsigned char name[4];       /* four-character file name */
   unsigned char extension;     /* extension number, range 0 - 99, 127 */
   unsigned char startpage;     /* page number where file starts */
   unsigned char numpages;      /* number of pages occupied by file */
   unsigned char attrib;        /* file/directory attribute */
   unsigned char bitmap[32];    /* current bitmap of the device */
} FileEntry;

(This is a packed structure on 1 byte boundaries)

The ‘name’ is a four characters left justified with spaces. The ‘extension’ is the file extension in the range of 0-99 for normal files and 100 for an add file. If the extension is 127 the entry is a directory entry. The ‘startpage’ indicates the page number that the file starts on. The number of pages is the estimated number of pages that the file takes up. ‘attrib’ indicates that attributes that the file or directory entry has. See TMAttribute for an explanation of the supported attributes. The ‘bitmap’ indicates that used pages in the device. A ‘1’ bit indicates a used page and a ‘0’ indicates an unused page. The ‘bitmap’ has the least significant byte first with the first page being in the least significant bit of the first byte. The ‘bitmap’ of the device is read and placed in the FileEntry structure even if there are no files in the directory (return 0).