BLFileCore Struct Reference

A thin abstraction over a native OS file IO [C Interface - Core].

Public Members

Member Data Documentation

intptr_t BLFileCore::handle

A file handle - either a file descriptor used by POSIX or file handle used by Windows. On both platforms the handle is always intptr_t to make FFI easier (it's basically the size of a pointer / machine register).

In C++ mode you can use BLFileCore::Handle or BLFile::Handle to get the handle type. In C mode you must use intptr_t. A handle of value -1 is considered invalid and/or uninitialized. This value also matches INVALID_HANDLE_VALUE, which is used by Windows API and defined to -1 as well.