Training
×

APIs that need a file object

The function names of the API are conclusive – and there always is the documentaton…
 
- open/close (CreateRtFile, DeleteRtFile, ReOpenRtFile)
CreateRtFile sets access, share and open mode as well as file attributes and flags. ShareMode FILE_SHARE_DELETE is ignored in INtime Distributed RTOS.
DeleteRtFile only deletes the file object, not the file itself. To delete a file, use RemoveRtFile.
ReOpenRtFile sets new access and share mode for a file object.
- read/write/seek (ReadRtFile, WriteRtFile, SetRtFilePointer, SetEndOfRtFile)
ReadRtFile/WriteRtFile work in asynchronous mode if file was opened with FILE_FLAG_ASYNCHRONOUS
- get/set fileattributes (SetRtFilePointer, SetEndOfRtFile, GetRtFileInfoByHandle, SetRtFileInfoByHandle, SetRtFileTime, GetRtFileSize, GetRtFileType )
Sets/returns specific information for a file associated with the file object
- wait on/cancel asynchronous requests (WaitForRtIo, CancelRtIo)
WaitForRtIo waits on completion of previous calls to ReadRtFile/WriteRtFile. This call also has a timeout input parameter to detect unusually long delays
- Flush buffers (FlushRtFileBuffers)
When this call returns successfully, the data stored in cache buffers by the operating system is guaranteed to have been flushed to the underlying medium