When parsing a FAT32 SDCard directory in order to display it on my homebrew computer, how do I reliably decide which entries to display, and which entries are meta data. I can tell the volume label. but after that its not so clear how to do this. Looking at the entries with a hex viewer, I can tell by eye what is an actual file or directory, but I'm not sure how to filter the meta data out.
I know how to read the attribute flags, but my test disk has entries where the attribute flags seem like they would be valid entries, but the entry clearly isn't. For instance, there is what appears to be a duplicate entry for a test .txt file on the disk. The only difference I see is that the fake entry is 0 bytes long, and It's archive flag is set. The real .txt file's entry had its archive bit set, but I cleared it in windows. Now the 0 byte length is the only difference. Yet, I feel a 0 byte file is something I should be able to display in my directory. (say I create a file on my command line, but don't do anything with it yet). So how would I know which entry to display?
There are a bunch of entries on my disk who's attribute byte is 0x0F. These entries are CLEARLY not files or directories. So is 0x0F an automatic non valid entry? seems so. There are a few other entries that are clearly not files or directories, but have some combo of attribute flags set.
Basically, how does windows decide what I see?