FSFile_PosGet()
FS_FILE_SIZE FSFile_PosGet (FS_FILE *p_file, FS_ERR *p_err);
File | Called from | Code enabled by |
---|---|---|
| Application; | N/A |
Set file position indicator.
See fs_ftell()
for more information.
Arguments
p_file
Pointer to a file.
p_err
Pointer to variable that will the receive return error code from the function:
FS_ERR_NONE
File position gotten successfully.
FS_ERR_NULL_PTR
Argument p_file
passed a NULL pointer.
FS_ERR_INVALID_TYPE
Argument p_file
's type is invalid or unknown.
FS_ERR_FILE_NOT_OPEN
File not open.
FS_ERR_FILE_INVALID_POS
Invalid file position.
Returned Value
The current file position, if no errors (see Note).
0, otherwise.
Notes/Warnings
- The file position returned is the number of bytes from the beginning of the file up to the current file position.