Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

FAT file system

Options
  • 23-03-2006 11:56am
    #1
    Closed Accounts Posts: 296 ✭✭


    Hello

    I need help finding the next cluster for a file in the FAT. I read the starting cluster from the root directory and then go to the FAT to find the next cluster. But i'm not sure what to look for, anyone know?
    Assume the clusters are not consecutive,


Comments

  • Registered Users Posts: 431 ✭✭plenderj


    Can you post the code you have so far?


  • Registered Users Posts: 1,193 ✭✭✭liamo


    It's a looong time since I've worked directly with the FAT but ....

    1. Get the starting cluster from the directory entry
    2. If the starting cluster is 100, you go to the 100th entry in the FAT for the next cluster.
    3. If the value in the 100th entry is 150, the next cluster is 150.
    4. Go to entry 150 for the next cluster.
    5. If there is an End Of File marker in the 150th entry then there are no more cluster.

    Sorry, I can't remember the value for the End of File marker.

    I've just looked in Wikipedia and there's loads of info there. Link

    Regards,

    Liam


  • Closed Accounts Posts: 296 ✭✭PDelux


    Thanks liamo. Your suggestion sounds right and i'll check it out.


Advertisement