Like readFull but reads at a given offset.
Declared in <folly/FileUtil.h>
[[nodiscard]]
ssize_t
preadFull(
int fd,
void* buf,
size_t count,
off_t offset);
The number of bytes read, or -1 on error.
The return value should not be discarded.
| Name | Description |
|---|---|
| fd | The file descriptor to read from. |
| buf | Destination buffer. |
| count | Number of bytes to read. |
| offset | File offset to read from. |