Checking Disk Vitals
Once the disk is mounted, you can check several important flash disk parameters:
- The fd.capacity read-only property will tell you the number of usable data sectors on the disk (this excludes housekeeping sectors maintained by the disk).
- The fd.numservicesectors read-only property will tell you how many sectors are used for internal "housekeeping" of the flash disk (see Disk Area Allocation Details).
- The fd.totalsize read-only property will indicate how many sectors the disk occupies in the flash memory. fd.totalsize = fd.capacity + fd.numservicesectors.
- The fd.getfreespace method will return the number of free data sectors on the disk (those not yet occupied for file data storage).
- The fd.maxstoredfiles read-only property will report the maximum number of files that can be stored on the disk (this is defined at the time of disk formatting).
- The fd.getnumfiles method fetches the number of files currently stored on the disk.
Keep in mind that the existing disk might not be the largest one that could fit in the current data area (fd.availableflashspace).