MCPcopy Create free account
hub / github.com/WheretIB/nullc / FileOpen

Function FileOpen

NULLC/includes/file.cpp:37–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35 return ret;
36 }
37 void FileOpen(NULLCArray name, NULLCArray access, File* file)
38 {
39 if(file->flag & FILE_OPENED)
40 fclose(file->handle);
41 file->flag = FILE_OPENED;
42 file->handle = fopen(name.ptr, access.ptr);
43 if(!file->handle)
44 nullcThrowError("Cannot open file.");
45 }
46 void FileClose(File* file)
47 {
48 fclose(file->handle);

Callers

nothing calls this directly

Calls 1

nullcThrowErrorFunction · 0.50

Tested by

no test coverage detected