fs_fsetpos()
int fs_fsetpos (FS_FILE *p_file, fs_fpos_t *p_pos);
File | Called from | Code enabled by |
---|---|---|
| Application |
|
Set file position indicator.
Arguments
p_file
Pointer to a file.
p_pos
Pointer to variable containing file position indicator.
Returned Value
0, if the function succeeds.
Non-zero value, otherwise.
Notes/Warnings
The return value should be tested against 0:
rtn = fs_fsetpos(pfile, &pos); if (rtn == 0) { // No error occurred } else { // Handle error }
- If a read or write error occurs, the error indicator shall be set.
- The value stored in pos should be the value from an earlier call to
fs_fgetpos()
. No attempt is made to verify that the value in pos was obtained by a call tofs_fgetpos()
. - See also
fs_fseek()
.