Bluetooth QuickStart Kit Version 1.0 - User’s Guide Page 53
Copyright 2004-2005 © Embedded Artists AB
B.4.3 fatIsDir
tFatResult fatIsDir( const tFatHandle handle, tBool* pIsDir )
Tests if the specified handle represents a file or folder.
Parameters:
[in] handle – A handle to the file.
[out] pIsDir – TRUE if the entry is a directory, otherwise FALSE
Returns:
FAT_OK if the test could be determined, otherwise an error code
Possible error situations (what can be identified in an error code):
FAT_OK - The function completed successfully.
FAT_ERROR_INV_HAND - The handle is invalid
B.4.4 fatRead
tFatResult fatIsDir( const tFatHandle handle, tU32 size, tU8*
pBuf, tU32 pNumRead )
This function attempts to read up to size bytes from the file pointed to by the pFile
handle. The offset from where the bytes will be read is specified in the handle and the
offset will be updated with the number of bytes that are read. The number of bytes
actually read may be smaller than the wanted number for a number of reasons, e.g., if the
end of file is reached, or the block size used by the device driver is smaller than the
requested size.
Parameters:
[in] handle – A handle to the file.
[in] size – The number of bytes to read
[in/out] pBuf – The buffer to store read data in
[out] pNumRead – The number of bytes that were actually read
Returns:
FAT_OK if at least one byte could be read, otherwise an error code
Possible error situations (what can be identified in an error code):
FAT_OK - The function completed successfully.
FAT_ERROR_INV_HAND - The handle is invalid
FAT_ERROR_A_FOLDER - The handle points to a folder, not a file
FAT_ERROR_EOF - File position was EOF before the call to fatRead
FAT_ERROR_READ - Read from media failed
B.4.5 fatWrite
tFatResult fatWrite( const tFatHandle handle, tU8* pBuf, tU32
size )