File system management in FAT32 - Sub-directory deletion in FAT32

DFT, a kind of IBM data protecting technology can check hard disk via using DFT program to access the DFT micro codes in hard disk. By DFT, users can conveniently check the hard drive operation.

Operating system manages sub-directory in the same way as manages files. So, the deletion ways are same, too.

Fast deletion
Fast deletion of sub-directory is the same as that of files. It just marked a deletion mark to the beginning byte in FDT that describes sub-directory; all files under this sub-directory and records of its inferior sub-directory are not changed, that is, just to "remove" this sub-directory into recycling bin.

Complete deletion
Take an example of completely deleting the sub-directory "\New Folder\gg":
The situation is:

To completely delete it, and compare changes of FDT, FAT and DATA between before and after deletion.

FDT before deletion:

From the comparison we can see, after deleting sub-directory, the first byte of the file registration entry is changed to E5H,other contents remain the same.

FAT before deletion:

FAT after deletion:

From the comparison we can see, the registration entry of the file in FAT has been reset, being marked as "empty". Now, if the user writes in new file to the partition, it is probable to cover the released empty cluster, thus covering the space ever used by this sub-directory.

After complete deletion of a directory, its sub-directories and files are not covered; only that there is no their entrance in FAT (because their cluster records in FAT have been reset). For system, it can write in data to sectors them cover anytime. The following are contents of a directory under the completely deleted directory "gg":