Information Technology Reference
In-Depth Information
Figure 9-2: A file with the name “This is a long file name.txt” requires four
32-byte entries. The 8.3 file name is THISIS~1.TXT.
Figure 9-2 shows a directory entry for a file named “This is a long file
name.txt”. The entry at 00C0h contains the 8.3 file name and extension
(“THISIS~1” and “TXT”). The entry at 00A0h contains the first 13 charac-
ters in the long file name: “This ”, “is a l”, “on”. The entry at 0080h con-
tains the next 13 characters: “g fil”, “e name”, and “.t”. The entry at 0060h
contains the final two characters: “xt”, with the remaining character loca-
tions set to FFFFh.
The characters in the LFN entry with the highest ordinal number appear
first in the file name, with the rest following in sequence. The entry that fol-
lows the LFN entry with an ordinal number of 1 is the 8.3 entry.
In the attributes field, bits 0-3 are all set to 1 to indicate that the entry is a
long-file-name entry. The cluster field is maintained for compatibility with
the 8.3 entries and should equal zero.
The Checksum
A checksum field matches an LFN entry with its 8.3 entry. The LFNCheck-
sum function shows how to compute the checksum. The function accepts
an 11-character 8.3 file name (without the dot) and returns the checksum.
int LFNChecksum(char * ShortFileName){
int Bit7;
int Character;
int Checksum = 0;
Search WWH ::




Custom Search