Information Technology Reference
In-Depth Information
#define ATTR_LONG_NAME 0x0f
#define DIR_DEL 0xE5 // deleted entry
#define DIR_EMPTY 0 // all entries that follow are empty
#define NULL 0
DIRENTRY LoadDirAttrib(FILEOBJ fo, word *fHandle)
{
DIRENTRY dir;
byte a;
// Get the directory entry and store the sector with the entry
// in the FILE structure's dsk -> buffer member.
dir = Cache_File_Entry( fo, fHandle, TRUE);
// Read the first character of the file name.
a = dir -> DIR_Name[0];
if (a == DIR_EMPTY)
dir = (DIRENTRY)NULL; // The entry is empty.
if (dir != (DIRENTRY)NULL)
{
if ( a == DIR_DEL)
dir = (DIRENTRY)NULL; // The entry is deleted.
else
{
// The entry exists. Get the directory's attributes.
a = dir -> DIR_Attr;
Search WWH ::




Custom Search