436
Platforms
©2000-2008 Tibbo Technology Inc.
file number.
The status code generated by the most recently invoked method is always kept by
the
R/O property. Some methods also return the status code
directly:
If
fd.create("File1.dat")<>PL_FD_STATUS_OK
Then
'some problem
End
If
Other methods return data, so the only way to check the result of their execution
is through the fd.laststatus:
s=fd.getdata(50)
'returns the data from the file, not the status code
If
fd.laststatus<>PL_FD_STATUS_OK
Then
'some problem
End
If
Some status codes are non-fatal, that is, they allow you to continue working.
Some status codes indicate a serious problem after which your
can't
be used and must be
. Such status codes are marked as "fatal" in
the list above. If one of the fatal codes is generated, the flash disk is dismounted
automatically and the
R/O property is set to 0- NO. The concept of disk
mounting is explained in
.
File-based Access
The following topics will explain how to work with the flash disk:
Creating, Deleting, and Renaming Files
Reading and Writing File Attributes
Walking Through File Directory
Writing To and Reading From Files
Formatting the Flash Disk
Before the flash disk can be used it must be formatted. Formatting allocates and
initializes the "housekeeping" area of the disk. This consists of two boot sectors
plus a certain number of sectors for the file record table (FRT) and the file
allocation table (FAT). For the exact numbers see
.
472
436
436
476
439
436
439
440
441
441
442
442
443
444
445
446
448
437