Mounting the Flash Disk
Discussed in this topic: fd.mount, fd.ready.
The flash disk will not be accessible unless it is mounted using fd.mount. It can only be mounted after the flash memory has been successfully formatted using fd.formatj (recommended) or fd.format. The disk has to be mounted after every reboot of your device (if you need to access it, of course). After the disk is mounted successfully, the fd.ready R/O property will read 1- YES.
During mounting, the fd. object accesses the BOOT sectors of the disk, reads the size of all disk areas, and determines if the flash disk is healthy. This does not include detailed checks of each file or data sector of the disk, but is enough to "catch" gross problems, such as disk corruption due to an increase in the application size.
Once the disk has been mounted, you can check its vitals, create and delete files, and perform other disk-related operations.
There is no way to explicitly dismount the disk, nor it is necessary. The disk will be dismounted (and fd.ready become 0- NO) if:
•Any fatal condition is detected when working with it. This condition will be reflected by the fd.laststatus R/O property. Not every error indicated by the fd.laststatus is fatal (see Fd. Object's Status Codes topic).
•The disk is formatted using fd.formatj (fd.format).
•Your application invokes fd.setbuffer/fd.setsector inappropriately.