MCPcopy Create free account
hub / github.com/InoriRus/Kyty / sys_file_close

Function sys_file_close

source/lib/Sys/src/SysWindowsFileIO.cpp:291–307  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

289}
290
291void sys_file_close(sys_file_t* f)
292{
293 if (f->type == SYS_FILE_FILE)
294 {
295 CloseHandle(f->handle);
296 } else if (f->type == SYS_FILE_MEMORY_STAT)
297 {
298 delete f->buf;
299 } else if (f->type == SYS_FILE_MEMORY_DYN)
300 {
301 mem_free(f->buf->base);
302 delete f->buf;
303 }
304
305 // f.type = SYS_FILE_ERROR;
306 delete f;
307}
308
309uint64_t sys_file_size(sys_file_t& f)
310{

Calls 1

mem_freeFunction · 0.85

Tested by

no test coverage detected