The following table shows the format of a directory entry in the Root Directory. The table given next Shows, how the 32 Bytes of directory entry of a file in Root Directory are sliced to store the various information about it:
Offset |
Size |
Description |
00H |
8 Bytes |
Filename
(Also see the next table for the special meaning of first character of file name) |
08H |
3 Bytes |
Extension |
0BH |
1 Byte |
File attributes(See The Table Of File Attributes) |
0CH |
10 Bytes |
Reserved |
16H |
2 Bytes |
Time Created or Last Updated (See Date–Time Format Table) |
18H |
2 Bytes |
Date Created or Last Updated (See Date–Time Format Table) |
1AH |
2 Bytes |
Starting or First cluster of file
(The value 0000H is used in Parent Directory ('..') entries to indicate that the Parent Directory is the Root Directory) |
1CH |
4 Bytes |
File size in Bytes. |
Filename contains the name in uppercase and if the size of filename is smaller than the 8 characters the spaces are filled with space characters of ASCII Number 32. Extension field contains the extension of file, in uppercase.
If the Filename is longer than the 8 characters, Windows creates a short filename from a long one by truncating it to six uppercase characters and adding "~1" to the end of the base filename.
If there is already another filename with the same first six characters, the number is incremented. The extension is kept the same, and any character that was illegal in earlier versions of Windows and DOS is replaced with an underscore.
Long filenames are stored in specially formatted 32-Byte Long File Name (LFN) directory entries marked with attribute bytes set to 0FH. For a given file or subdirectory, a group of one or more Long filename directory entries immediately precedes the single 8.3 directory entry on the disk.
Each LFN directory entry contains up to 13 characters of the long filename, and the operating system strings together as many as needed to comprise an entire long filename.
This is the cause, why the long file names decreases the maximum possible number of root directory entries in a File system. How Windows Supports Long File Names, We shall Discuss in detail, Later in this Chapter.
The first Byte of the filename may also contain some important information about file. The information given by this byte may be one of as given in the following table:
First Character of File Name |
Value |
Meaning |
00H |
Indicates that this directory entry is unused. |
05H |
Indicates that 1st character of filename is character E5H But actually the file has not been deleted. (See the Meaning of E5H) |
E5H |
The file has been Erased and this directory entry is a deleted file’s directory entry. The data area previously occupied by that file is now free for allocation for another new file. |
2EH |
This is a Sub-directory. The cluster number field of this entry will contain the cluster number of the directory. |
2EH 2EH |
Two 2EH in a directory entry indicate the parent directory entry of a Sub–Directory. The cluster number of this entry will contain the cluster number of the parent directory of this directory. The cluster number will be zero 0000H if the parent directory is root directory. |
|