S
superhac007
Hi,
I am looking for information on how to add and remove files from a
fat32 file system. Specifically the pseudo mechanics not actual
code. I have some idea, but I'm not sure if this is the optimum way.
For adding I am assuming the following steps:
1) add the file entry to the directory. Do I find the first available
entry (0x00) or can I replace a deleted directory entry (0xE5)?
2) Find an available cluster in the FAT Table. Do I search for the
first available entry location that is set to 0x00000000?
3) Break up the file data among clusters and update the FAT entries,
and set starting cluster of file.
for deleting:
1) set the filename length to 0xE5. Then do I reset the clusters that
make up that file to (0x00000000)?
Thanks,
Steve
I am looking for information on how to add and remove files from a
fat32 file system. Specifically the pseudo mechanics not actual
code. I have some idea, but I'm not sure if this is the optimum way.
For adding I am assuming the following steps:
1) add the file entry to the directory. Do I find the first available
entry (0x00) or can I replace a deleted directory entry (0xE5)?
2) Find an available cluster in the FAT Table. Do I search for the
first available entry location that is set to 0x00000000?
3) Break up the file data among clusters and update the FAT entries,
and set starting cluster of file.
for deleting:
1) set the filename length to 0xE5. Then do I reset the clusters that
make up that file to (0x00000000)?
Thanks,
Steve