DIRENTRY

DIRENTRY STRUC

deName db '????????' ;name

deExtension db '???' ;extension

deAttributes db ? ;attributes

deReserved db 10 dup(?) ;reserved

deTime dw ? ;time

deDate dw ? ;date

deStartCluster dw ? ;starting cluster

deFileSize dd ? ;file size

DIRENTRY ENDS

The DIRENTRY structure contains information about a file or directory name, attributes, date, time, and starting cluster.

Fields

deName

Specifies the name of the file or directory. If the file or directory was created by using a name with fewer than eight characters, space characters (ASCII 20h) fill the remaining bytes in the field. The first byte in the field can be a character or one of the following values:

Value Meaning

00h The directory entry has never been used. MS-DOS uses this value to limit the length of directory searches.
05h The first character in the name has the value 0E5h.
2Eh The directory entry is an alias for this directory or the parent directory. If the remaining bytes are space characters (ASCII 20h), the deStartCluster field contains the starting cluster for this directory. If the second byte is also 2Eh (and the remaining bytes are space characters), deStartCluster contains the starting cluster number of the parent directory, or zero if the parent is the root directory.
0E5h The file or directory has been deleted.

deExtension

Specifies the file or directory extension. If the extension has fewer than three characters, space characters (ASCII 20h) fill the remaining bytes in this field.

deAttributes

Specifies the attributes of the file or directory. This field can contain some combination of the following values:

Value Meaning

ATTR_READONLY (01h) Specifies a read-only file.
ATTR_HIDDEN (02h) Specifies a hidden file or directory.
ATTR_SYSTEM (04h) Specifies a system file or directory.
ATTR_VOLUME (08h) Specifies a volume label. The directory entry contains no other usable information (except for date and time of creation) and can occur only in the root directory.
ATTR_DIRECTORY (10h) Specifies a directory.
ATTR_ARCHIVE (20h) Specifies a file that is new or has been modified.

All other values are reserved. (The two high-order bits are set to zero.)

If no attributes are set, the file is a normal file (ATTR_NORMAL).

deReserved

Reserved; do not use.

deTime

Specifies the time the file or directory was created or last updated. The field has the following form:

Bits Meaning

0–4 Specifies two-second intervals. Can be a value in the range 0 through 29.
5–10 Specifies minutes. Can be a value in the range 0 through 59.
11–15 Specifies hours. Can be a value in the range 0 through 23.

deDate

Specifies the date the file or directory was created or last updated. The field has the following form:

Bits Meaning

0–4 Specifies the day. Can be a value in the range 1 through 31.
5–8 Specifies the month. Can be a value in the range 1 through 12.
9–15 Specifies the year, relative to 1980.

deStartCluster

Specifies the starting cluster of the file or directory.

deFileSize

Specifies the size of the file, in bytes.

See Also

Interrupt 21h Function 11h Find First File with FCB
Interrupt 21h Function 12h Find Next File with FCB