Embedded TCP/IP stack: fnet_fs_fread

FNET

fnet_size_t fnet_fs_fread ( void *  buf,
fnet_size_t  size,
fnet_fs_file_t  file 
)

Reads data from a file.

Parameters
bufPointer to the buffer to store the read data.
sizeNumber of bytes to read.
fileFile descriptor.
Returns
This function returns:
  • The total number of bytes successfully read.
See also
fnet_fs_fgetc(), fnet_fs_rewind(), fnet_fs_feof()

This function reads an array of bytes from the file and stores them in the block of memory specified by buf.
The position indicator of the file descriptor is advanced by the total amount of bytes read.


© 2005-2018 by Andrey Butok. http://fnet.sourceforge.net