folly::readvFull

Like readFull but scatter-reads into multiple buffers.

Synopsis

Declared in <folly/FileUtil.h>

[[nodiscard]]
ssize_t
readvFull(
    int fd,
    iovec* iov,
    int count);

Return Value

The number of bytes read, or -1 on error.

NOTE

The return value should not be discarded.

Parameters

NameDescription
fdThe file descriptor to read from.
iovArray of buffers to fill; contents after return are unspecified.
countNumber of entries in iov.