HomeManualTopicsTypesSymbols

std_types::file_descriptor/std::read

reads from a file

Parameters

fd
the file descriptor
size
the maximum number of bytes to read

Result

buf
the read data

Description

If buf is empty then no more data is available.

Otherwise, if buf is not an error-object, then buf contains as many bytes as could be read without further blocking.

If an error occurs then an appropriate error-object is returned.

This function needs I/O-access rights.

Topic

POSIX

Implements

std::read a low level read function

See also

std::write a low level write function
std::open opens a file
std::close closes the specified file without returning success status
std::fsync flushes all buffers associated with the file descriptor