2.4.1 File Entry Fields

Status
Contains information specifying the type of structure this is. It also contains the status of the pointers in the structure and the status of the attributes, time, date, and name.

Bit

Definition

0

Exists
1 Exists
0 Deleted

1

ATDFields
1 ATD fields are most recent
0 ATD fields are superseded

3-2

StructType
01 FileEntry structure

4

FNULLBits
0 PrimaryPtr valid
1 PrimaryPtr is FNULL

5

0 SecondaryPtr valid
1 SecondaryPtr is FNULL

6

0 SiblingPtr valid
1 SiblingPtr is FNULL

7

Reserved
Must be 1.

15-8

CompressionID
The ID of the compression algorithm to be used when compressing and/or decompressing this file.


Exists
Indicates whether or not the entry under consideration is a valid member of the file hierarchy. The bit is cleared when a file has been deleted. Deleted entry information should be ignored. However, if the SiblingPtr is not FNULL, then it is still valid and is used in traversing a sibling chain.

ATDFields
Indicates whether or not the Attributes/Time/Date fields in this structure are the most current for this file. The first valid structure in the FileEntry linked list to have this bit set has valid information, all others should be ignored. This bit only affects the validity of these fields.

StructType
Indicates that this structure is a file entry.

FNULL bits
Indicate whether the corresponding pointer is to be considered to have a value of FNULL, regardless of the actual value of the pointer. The FNULL bits are cleared only after their respective pointers are assigned values by the file system. Therefore, the FNULL bits are the first check for validity of these pointers. These bits provide yet another fail-safe measure to guarantee file system integrity in the event of a system crash while updating these pointers.

Reserved
Must be 1.

CompressionID
A code indicating the type of compression algorithm that is to be used when reading or writing to this file. Compression IDs of 00h to 7Fh are reserved by Microsoft for future use. Multiple CompressionIDs can be used on a given partition.

SiblingPtr
A pointer to the next sibling file or directory at the same level in the hierarchy as the present file. This pointer is only valid if the SecondaryPtr is FNULL (or considered to have a value of FNULL as indicated by the FNULL bits). A pointer value of FNULL, or one that is considered to have a value of FNULL as indicated by the FNULL bits, indicates the last entry in the chain.

PrimaryPtr
A pointer to the present file's first FileInfo structure. The PrimaryPtr is used to locate the first entry in the FileInfo chain only if PrimaryPtr is not FNULL (and not considered to have a value of FNULL as indicated by the FNULL bits) and SecondaryPtr is FNULL (or considered to have a value of FNULL as indicated by the FNULL bits). If both PrimaryPtr and SecondaryPtr are FNULL (or considered to have values of FNULL as indicated by the FNULL bits), then the end of the chain has been reached.

SecondaryPtr
A pointer to a FileEntry that supersedes the current FileEntry. The SecondaryPtr is used to indicate that a FileEntry structure has been completely superseded. In this case SecondaryPtr is the only pointer field in the FileEntry structure that is valid.

Attrib/Time/Date
File creation/modification attributes, time, and date in MS-DOS format. See previous bit field definitions.

VarStuctLen
The sum total length, in bytes, of all the variable length structures appended after the end of the members of the FileEntry structure. This field must be zero, indicating that none of these structures is present.

NameLen
The length, in bytes, of the following combined file name and extension fields. This field is added for the purpose of adding long file names in a future version of the file system.

Name[8]
File name in MS-DOS format. Names are left-justified and padded with blanks (20h). Valid characters, as defined by MS-DOS for the 8.3 names, are any combination of letters, digits and the following special characters:

$ % - _ ~ ! ( ) { } ^ # &

FFS does not distinguish between uppercase and lowercase letters.

Ext[3]
File extension in MS-DOS format. Names are left-justified and padded with blanks (20h). Valid characters, as defined by MS-DOS for the 8.3 names, are any combination of letters, digits and the following special characters:

$ % - _ ~ ! ( ) { } ^ # &

FFS does not distinguish between uppercase and lowercase letters.

Figure 4

Figure 4 depicts how each pointer type within a FileEntry is related to all valid subsequent structures.