fs_size_t fs_fread (void *p_dest,
fs_size_t size,
fs_size_t nitems,
FS_FILE *p_file);
File | Called from | Code enabled by |
---|---|---|
| Application |
|
Read from a file.
Arguments
p_dest
Pointer to destination buffer.
size
Size of each item to read.
nitems
Number of items to read.
p_file
Pointer to a file.
Returned Value
Number of items read.
Notes/Warnings
- The size or nitems is 0, then the file is unchanged and zero is returned.
- If the file is buffered and the last operation is output (write), then a call to
fs_flush()
orfs_fsetpos()
orfs_fseek()
must occur before input (read) can be performed. - The file must have been opened in read or update (read/write) mode.