zainka
Full Member level 2
Microsoft FAT16
Hi
Hopes this is the appropriate forum to post this question.
I have been digging into the FAT16 description but have a question in how the undelete function can work for files stored in FAT16 formatted enviroments (and other FAT versions).
The FAT part of FAT16 holds a 16bit record of all clusters in the data area in a partition. Each record tells if the cluster is free, reserved, marked BAD, if its EOF or if it is a part of a linked list by holding the address for the next cluster in chain.
If a file is deleted, the directory entry for this particulary file is changed by marking first letter in file name wit a special character, this is OK, but I then also guess that all clusters which was a part of the chain belonging to this file should be marked as beeing free in the FAT, thus breaking the chain.
How can then undelete know which clusters is belonging to the deleted file? I mean, the directory entry correctly still points to the first cluster in the chain, but the corresponding cluster in the FAT should now be listed as beeing free and not point to next cluster in chain, or is this not correct. Does it still point to next cluster in a now deleted file/chain? Wouldnt this cause a problem when storing new files later and you do not find any free clusters in the FAT? Then you would have to search for deleted fiels too, before you know if there is any clusters available or not.. time consuming...
I am missing something here, this I do know since Undelete obviously works, but I cant see what.
Please help
Best regards
Vidar (Z)
Hi
Hopes this is the appropriate forum to post this question.
I have been digging into the FAT16 description but have a question in how the undelete function can work for files stored in FAT16 formatted enviroments (and other FAT versions).
The FAT part of FAT16 holds a 16bit record of all clusters in the data area in a partition. Each record tells if the cluster is free, reserved, marked BAD, if its EOF or if it is a part of a linked list by holding the address for the next cluster in chain.
If a file is deleted, the directory entry for this particulary file is changed by marking first letter in file name wit a special character, this is OK, but I then also guess that all clusters which was a part of the chain belonging to this file should be marked as beeing free in the FAT, thus breaking the chain.
How can then undelete know which clusters is belonging to the deleted file? I mean, the directory entry correctly still points to the first cluster in the chain, but the corresponding cluster in the FAT should now be listed as beeing free and not point to next cluster in chain, or is this not correct. Does it still point to next cluster in a now deleted file/chain? Wouldnt this cause a problem when storing new files later and you do not find any free clusters in the FAT? Then you would have to search for deleted fiels too, before you know if there is any clusters available or not.. time consuming...
I am missing something here, this I do know since Undelete obviously works, but I cant see what.
Please help
Best regards
Vidar (Z)