Apps Components Interfaces All Files Source Tree | source: tos.lib.FS.FileRead.nc |
File reading interface, supports sequential reads.
Commands |
Events |
read
completes
getRemaining
completes
Parameters: |
n - Number of bytes remaining in file result - FS_OK: operation was successful FS_ERROR_xxx: read failure cause |
Returns: | Ignored |
Commands - Details |
Parameters: |
filename - Name of file to open. Must not be stack allocated. |
Returns: |
SUCCESS: attempt proceeds, opened will be signaledFAIL: filesystem is busy or another file is open for reading |
Parameters: |
buffer - Target to read into n - Number of bytes to read |
Returns: |
SUCCESS: attempt proceeds, readDone will be signaledFAIL: no file was open for reading, or a read is in progress |
Returns: |
SUCCESS: attempt proceeds, remaining will be signaledFAIL: no file was open for reading, or a read is in progress |
Events - Details |
read
completes
Parameters: |
buffer - Buffer that was passed to nRead - Number of bytes actually read , but result will still be FS_OK) result - FS_OK: read was successful (if end-of-file is reached,
|
Returns: | Ignored |