Philips Bluetooth QuickStart Kit GPS Receiver User Manual


 
Bluetooth QuickStart Kit Version 1.0 - User’s Guide Page 54
Copyright 2004-2005 © Embedded Artists AB
This function attempts to write size bytes to the file pointed to by the handle. The offset
to where the bytes will be written is specified in the handle and the offset will be updated
with the number of bytes that are written.
Parameters:
[in] handle – A handle to the file.
[in] pBuf – The buffer with the data to write
[in] size – The number of bytes to write
Returns:
FAT_OK if exactly size bytes were written, 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_WRITE - Writing to the media failed
FAT_ERROR_READ_ONLY - If m_fat_media_allow_write() does not allow write
operations
B.4.6 fatClose
tFatResult fatClose( tFatHandle* pHandle )
This function closes the specified file/folder and releases all used resources. The actual
structure must be freed by the caller.
Parameters:
[in/out] pHandle – A handle to the file or folder to close
Returns:
FAT_OK if the file/folder could be closed, 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.7 fatRemoveFile
tFatResult fatRemoveFile( const tU8* pPath )
This function deletes the specified file.
Parameters:
[in] pPath – An absolute path to the file to remove.
Returns:
FAT_OK if the file existed and was removed, otherwise an error code
Possible error situations (what can be identified in an error code):
FAT_OK - The function completed successfully.
FAT_ERROR_NOT_EXIST – The file did not exist