Lely core libraries
2.2.5
|
Go to the documentation of this file.
22 #ifndef LELY_IO_FILE_H_
23 #define LELY_IO_FILE_H_
120 #endif // !LELY_IO_FILE_H_
@ IO_FILE_READ
Open a file for reading.
@ IO_FILE_APPEND
Append data to the end of the file.
@ IO_FILE_CREATE
Create a new file if it does not exists.
io_handle_t io_open_file(const char *path, int flags)
Opens a regular file.
@ 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.
int64_t io_off_t
A file offset type.
@ IO_FILE_TRUNCATE
Truncate an existing file (ignored if IO_FILE_NO_EXIST is set).
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.
@ IO_SEEK_END
A seek operation with respect to the end of a 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.
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.