@CHIP-RTOS C Library V2.06 - BIOS API
BIOS_Fast_Findfirst
Provide an access to the file
system directories which locks the directory against
write activity during the directory search. int BIOS_Fast_Findfirst (const char far *filename,
FILE_FIND far *find,
unsigned int attributes ); Parameters
filename
- Pointer to null terminated ASCII file name pattern
for search which may contain * and ? wild card characters.
find
- Pointer to a
FILE_FIND
structure that will be initialized inside this API call.
attributes
- File attributes (provisional, not used!)
Return Value
- 0: No file found
1: Success
Comments
- This function and the
BIOS_Fast_Findnext
provide a slightly faster
findfirst/next access than do the DOS compatible functions available on
software interrupt
0x21.
(Historically, this function was significantly faster than
the @Chip-RTOS's DOS findfirst/findnext implementation. But
since this time the DOS functions have been corrected so the
speed advantage is no longer an issue here.)
More importantly, this function places a write protection
lock on the directory being searched for use in a mult-tasking
environment.
This function is reentrant. However, eventually the system will
run out of file system resources (e.g. directory nodes) if too many sessions
are simultaneously active.
These functions work in a similar way to the DOS SWI 0x21 findfirst/next
functions. BIOS_Fast_Findfirst must be called first. Then the
BIOS_Fast_Findnext is used repeatedly as required to iterate through
all the files in a directory matching the specified filename
pattern.
When a lock protection against directory writes is not desired
between calls to the file iteration functions, the normal C-library
findfirst/findnext functions should instead be used.
CAUTION:
The BIOS_Fast_Find_Done function
must be called if the Findfirst/Findnext sequence is stopped prior to
these iteration functions returning with a zero ("File not found")
indication. This is important so that the directory can be unlocked
and file system resources released!
SC1x3 Comments- Long file names can be accessed with the
BIOS_LFN_Findfirst function.
See Also
RTOS API
- This library function invokes a RTOS software interrupt.
Refer to this RTOS API function's
documentation
for more details.
Supported since or modified in @CHIP-RTOS version-
SC12 | SC13 | SC11 | SC1x3 |
-
V1.20 | V1.20 | V1.20 | V0.91 |
This API List
List of C Libraries
@CHIP-RTOS Main Index
End of document
|