Page 1 of 1

FAT32: Attributes of the Root Directory

Posted: Mon Jan 25, 2016 10:11 pm
by mark3094
Hi,

I'm working with FAT32, and I can see that it's simple to get attributes for most files; Just load the file's parent directory, and look at the corresponding directory entry.
Is there a way to get attributes, such as creation time, modified time, etc for the root directory? As it does not have a parent directory, I'm not sure how to get these details beyond what is in the BPB, which doesn't have time stamps.
I've had a look through Microsoft's FAT32 File System Specification, but can't find anything there.

Could I safely assume that any time stamps could be zero? Is there any way of determining the size of the root directory, other than following the cluster-chain, and counting the clusters?


Thanks

Re: FAT32: Attributes of the Root Directory

Posted: Mon Jan 25, 2016 11:58 pm
by alexfru
From the official documentation:
For FAT32, the root directory can be of variable size and is a cluster chain, just like any other directory is. The first cluster of the root directory on a FAT32 volume is stored in BPB_RootClus. Unlike other directories, the root directory itself on any FAT type does not have any date or time stamps, does not have a file name (other than the implied file name “\”), and does not contain “.” and “..” files as the first two directory entries in the directory.
So, no date/time, no attributes, no size.

Re: FAT32: Attributes of the Root Directory

Posted: Tue Jan 26, 2016 2:15 am
by mark3094
I missed that line in the official docs.
Thanks for your response, I appreciate it.