TexFAT Padding Directory Entry

Offset

Size

Description

Comments

0 (0x00)

1

EntryType

0xA1

1 (0x01)

31

Reserved

 

exFAT 1.00 does not define TexFAT Padding directory entry. TexFAT Padding directory entries are only valid in the first cluster of directory and occupy every directory entry of the cluster. The implementations should not move TexFAT Padding directory entries.

 

Windows CE Access Control Table Directory Entry

Offset

Size

Description

Comments

0 (0x00)

1

EntryType

0xA2

1 (0x01)

31

Reserved

 

exFAT 1.00 does not define Windows CE Access Control Table Directory Entry.

 

Stream Extension Directory Entry

Offset

Size

Description

Comments

0 (0x00)

1

EntryType

0xC0

1 (0x01)

1

GeneralSecondaryFlags ↓

 

Bits

Size

Description

Comments

0

1

AllocationPossible

Must be 1

1

1

NoFatChain

 

2

14

CustomDefined

 

2 (0x02)

1

Reserved1

 

3 (0x03)

1

NameLength

Length of Unicode name contained in subsequent File Name directory entries

4 (0x04)

2

NameHash

Hash of up-cased file name

6 (0x06)

2

Reserved2

 

8 (0x08)

8

ValidDataLength

Must be between 0 and DataLength

16 (0x10)

4

Reserved3

 

20 (0x14)

4

FirstCluster

 

24 (0x18)

8

DataLength

For directories maximum 256 MB

Stream Extension directory entry must immediately follow the File directory entry in the set. It could be only one Stream Extension entry in the set. If NoFatChain flag is set, all allocated clusters are contiguous.

The NameHash field facilitates the purpose of fast file name comparison and is performed on up-cased file name. NameHash verify against a mismatch, however matching hashes cannot guarantee the equality offile names. If name hashes match, a subsequent full name comparison must be performed.


// fileName points to up-cased file name
UNIT16  NameHash(WCHAR *file Name, intnameLength)
{
UNIT16 hash = 0;
unsignedchar *data = ( unsignedchar*) fileName;

for ( inti = 0; i<nameLenght*2; i++)
hash = (hash << 15) | (hash >> 1) + data[i];
returnhash;
}

ValidDataLength determines how much actual data written to the file. Implementation shall update this field as data has been written. The data beyond the valid data length is undefined and implementation shall return zeros.

previous < content > next