467
TIDE and Tibbo BASIC User Manual
©2000-2008 Tibbo Technology Inc.
.Format Method
Function:
Formats the flash memory to create a flash disk.
Syntax:
fd.format(totalsize as word, numstoredfiles as byte) as
pl_fd_status_codes
Returns:
One of the following
, also affects
:
0- PL_FD_STATUS_OK: Completed successfully.
1- PL_FD_STATUS_FAIL : Physical flash memory failure
(fatal).
4- PL_FD_STATUS_INV_PARAM: Invalid argument have
been provided for the invoked method.
See Also:
Part
Description
totalsize
Desired number of sectors occupied by the disk in flash
memory. Cannot exceed available space (
) and may be slightly corrected
downwards for internal housekeeping reasons. Actual total
size can be checked through the
.
maxstoredfiles
Desired maximum number of files that the disk will allow to
create. Actual maximum number of files will be adjusted
automatically to be a multiple of four and not exceed 64
(for example, specifying 6 will result in the actual value of
8). If you specify 0 you will get 4 files.
Details
Actual usable capacity (
) of the formatted disk will be less than its
total size. This is because the disk also includes "housekeeping" sectors (see
). Reducing the maxstoredfiles parameter decreases the
number of required housekeeping sectors.
The 4- PL_FD_INV_PARAM status code will be returned if the totalsize specified
exceeded available space (fd.availableflashspace) or was too small even for the
"housekeeping" data of the disk to fit in.
After formatting the disk will be in the dismounted state and will need to be
mounted (see
) before any disk-related activity can be successfully
performed.
.Getattributes Method
Function:
Returns the attributes string for a file with the specified
file name.
Syntax:
fd.getattributes(byref name as string) as string
472
472
436
457
483
458
475
474