title: How to detect end of directory in the data area of FAT32?
body: <p>I am working with the disk file directly. since the size of a directory is 0 in the directory structure, I wonder how do I detect the end of a directory file on the disk.</p>
  
  <pre><code>DIR_Name[0] == 0x00
  </code></pre>
  
  <p>The above way to detect end of directory doesn't seem reliable. I found on wiki that the size of the root directory in FAT32 is fixed to 512 entries, but what about other subdirectories. I might need to traverse down directories using the FAT and the cluster number.</p>