Blend2D
2D Vector Graphics Engine
A thin abstraction over a native OS file IO [C++ API].
A thin wrapper around a native OS file support. The file handle is always intptr_t
and it refers to either a file descriptor on POSIX targets and file handle on Windows targets.
Creates an empty file instance, which doesn't represent any open file.
Move constructor - copies file descriptor from other
to this instance and resets other
to a default constructed state.
Creates a file instance from an existing file handle
, which either represents a file descriptor or Windows HANDLE
(if compiled for Windows platform).
Destroys this file instance - closes the file descriptor or handle when it's referencing an open file.
Tests whether the file is open.
Attempts to open a file specified by fileName
with the given openFlags
.
Sets the file position of the file to the given offset
by using the specified seekType
.
Sets the file position of the file to the given offset
by using the specified seekType
and writes the new position into positionOut
output parameter.
Reads n
bytes from the file into the given buffer
and stores the number of bytes actually read into the bytesReadOut
output parameter.
Writes n
bytes to the file from the given buffer
and stores the number of bytes actually written into the bytesReadOut
output parameter.
Truncates the file to the given maximum size maxSize
.
Queries an information of the file and stores it to infoOut
.