466
Platforms
©2000-2008 Tibbo Technology Inc.
mo
de
Search mode:
0- PL_FD_FIND_EQUAL: Find data that is equal to the substr.
1- PL_FD_FIND_NOT_EQUAL: Find data that is not equal to the substr.
2-PL_FD_FIND_GREATER: Find data with value greater than the value of
the substr.
3- FIND_GREATER_EQUAL: Find data with value greater than or equal to
the value of the substr.
4- PL_FD_FIND_LESSER: Find data with value less than the value of the
substr.
4- PL_FD_FIND_LESSER_EQUAL: Find data with value less than or equal
to the value of the substr.
Details
The fd.find is a powerful method that allows you to do the "full text" search
(incr=1) or "database record" search (incr= your_record_size) across the file.
Searching back is less efficient than searching forward (by ~50%).
All status codes generated by this method are "generic" and are not described
here.
.Flush Method
Function:
Saves back to the flash memory ("flushes") the changes
made to the most recently edited file.
Syntax:
fd.close() 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).
See Also:
Writing To and Reading From Files
Details
When any sector of the flash disk is being altered, this is done in a RAM buffer. To
improve efficiency and reduce sector wear, the data from the RAM buffer is written
back to the flash memory only when it becomes necessary to load the buffer with
the contents of another sector. When the file is closed (see
), buffer
"flushing" is done automatically. However, if changes are made to any file and
then no disk activity is performed for this or any other file afterwards, the buffer
may keep the last changes made indefinitely. These changes will be lost if your
device reboots. To prevent this, use the fd.flush method.
Note that the fd.flush method does not depend on the current
value
and works globally on any most recently changed file.
472
472
444
460
463