Lely core libraries
2.3.4
|
Go to the documentation of this file.
22 #ifndef LELY_IO_FILE_HPP_
23 #define LELY_IO_FILE_HPP_
26 #error "include <lely/io/file.h> for the C interface"
49 IOHandle::operator=(
file);
55 IOHandle::operator=(::std::forward<IOFile>(
file));
60 seek(
io_off_t offset,
int whence) noexcept {
61 return io_seek(*
this, offset, whence);
65 pread(
void* buf,
size_t nbytes,
io_off_t offset) noexcept {
66 return io_pread(*
this, buf, nbytes, offset);
70 pwrite(
const void* buf,
size_t nbytes,
io_off_t offset) noexcept {
71 return io_pwrite(*
this, buf, nbytes, offset);
77 #endif // !LELY_IO_FILE_HPP_
The type of objects thrown as exceptions to report a failure to initialize an instantiation of a C ty...
A regular file device handle.
io_handle_t io_open_file(const char *path, int flags)
Opens a regular file.
int64_t io_off_t
A file offset type.
io_off_t io_seek(io_handle_t handle, io_off_t offset, int whence)
Moves the current read/write offset of an open file.
#define throw_or_abort(e)
If exceptions are disabled, aborts the process instead of throwing an exception.
ssize_t io_pwrite(io_handle_t handle, const void *buf, size_t nbytes, io_off_t offset)
Performs a write operation at the specified offset, without updating the file pointer.
ssize_t io_pread(io_handle_t handle, void *buf, size_t nbytes, io_off_t offset)
Performs a read operation at the specified offset, without updating the file pointer.