22#ifndef LELY_IO_FILE_H_
23#define LELY_IO_FILE_H_
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.
@ IO_FILE_READ
Open a file for reading.
@ IO_FILE_CREATE
Create a new file if it does not exists.
@ IO_FILE_APPEND
Append data to the end of the file.
@ IO_FILE_TRUNCATE
Truncate an existing file (ignored if IO_FILE_NO_EXIST is set).
@ IO_FILE_NO_EXIST
Fail if the file already exists (ignored unless IO_FILE_CREATE is set).
@ IO_FILE_WRITE
Open a file for writing.
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.
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.
io_handle_t io_open_file(const char *path, int flags)
Opens a regular file.
@ IO_SEEK_CURRENT
A seek operation with respect to the current offset in a file.
@ IO_SEEK_BEGIN
A seek operation with respect to the beginning of a file.
@ IO_SEEK_END
A seek operation with respect to the end of a file.
This is the public header file of the I/O library.
int64_t io_off_t
A file offset type.
ptrdiff_t ssize_t
Used for a count of bytes or an error indication.