The file access functions (listed in Table - File API functions) provide an API for performing a sequence of operations on a file located on a volume’s file system. The file object pointer returned when a file is opened is passed as the first argument of all file access functions (a characteristic which distinguishes these from the entry access functions), and the file object so referenced maintains information about the actual file (on the volume) and the state of the file access. The file access state includes the file position (the next place data will be read/written), error conditions and (if file buffering is enabled) the state of any file buffer.
Panel |
---|
borderWidth | 0 |
---|
title | Table - File API functions |
---|
|
Function | Description |
---|
FSFile_BufAssign()
| Assign buffer |
|
...
...
to a file. | FSFile_BufFlush()
| Write buffered data to volume. | FSFile_Close()
| Close a file. | FSFile_ClrErr()
| Clear error(s) on a file. | FSFile_IsEOF()
| Determine whether a file is at EOF. | FSFile_IsErr()
| Determine whether error occurred on a file. | FSFile_IsOpen()
| Determine whether a file is open or not. | FSFile_LockGet()
| Acquire task ownership of a file. | FSFile_LockSet()
| Release task ownership of a file. | FSFile_LockAccept()
| Acquire task ownership of a file (if available). | FSFile_Open()
| Open a file. | FSFile_PosGet()
| Get file position. | FSFile_PosSet()
| Set file position. | FSFile_Query()
| Get information about a file. | FSFile_Rd()
| Read from a file. | FSFile_Truncate()
| Truncate a file. | FSFile_Wr()
| Write to a file. |
|