C
int FSfseek( FSFILE * stream, long offset, int whence );
Description
The FSfseek function will change the current position in the file to one specified by the user. First, an absolute offset is calculated using the offset and base location passed in by the user. Then, the position variables are updated, and the sector number that corresponds to the new location. That sector is then loaded. If the offset falls exactly on a cluster boundary, a new cluster will be allocated to the file and the position will be set to the first byte of that cluster.
Preconditions
File opened
Parameters
Return Values
Return Values |
Description |
0 |
Operation successful |
-1 |
Operation unsuccesful |
Side Effects
The FSerrno variable will be changed.
Remarks
None