Read all data form the current file handle pointer.
- Parameters
-
| [in] | handle | The file handle. |
| [out] | out_bytes | The data that read. |
| [out] | out_bytes_read | How much bytes we read. |
- Returns
- true if file handle is valid and successfully read data.
Definition at line 123 of file FileLibrary.cpp.
124 {
126
127 if (handle->handle && out_bytes && out_bytes_read)
128 {
129 uint64_t size = 0;
131 {
132 return false;
133 }
134
135 *out_bytes_read = fread(out_bytes, 1, size, static_cast<FILE*>(handle->handle));
136 return *out_bytes_read == size;
137 }
138 return false;
139 }
#define SPICES_PROFILE_ZONE
static bool FileLibrary_Size(const FileHandle *handle, uint64_t *out_size)
Calculate The file size.
References FileLibrary_Size(), and Spices::FileHandle::handle.
Referenced by SpicesTest::TEST().