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

Function FileRead

NULLC/includes/file.cpp:130–139  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

128 }
129
130 void FileRead(NULLCArray arr, File* file)
131 {
132 if(!file->handle)
133 {
134 nullcThrowError("Cannot read from a closed file.");
135 return;
136 }
137 if(arr.len != fread(arr.ptr, 1, arr.len, file->handle))
138 nullcThrowError("Failed to read from a file.");
139 }
140 void FileWrite(NULLCArray arr, File* file)
141 {
142 if(!file->handle)

Callers

nothing calls this directly

Calls 1

nullcThrowErrorFunction · 0.50

Tested by

no test coverage detected