MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / ddio_FileDiff

Function ddio_FileDiff

ddio/winfile.cpp:164–177  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

162bool ddio_SetWorkingDir(const char *path) { return (SetCurrentDirectory(path)) ? true : false; }
163
164bool ddio_FileDiff(const std::filesystem::path &path1, const std::filesystem::path &path2) {
165 struct _stat abuf, bbuf;
166
167 if (_stat(path1.u8string().c_str(), &abuf))
168 Int3(); // error getting stat info
169
170 if (_stat(path2.u8string().c_str(), &bbuf))
171 Int3(); // error getting stat info
172
173 if ((abuf.st_size != bbuf.st_size) || (abuf.st_mtime != bbuf.st_mtime))
174 return true;
175
176 return false;
177}
178
179// get a file's length
180int ddio_GetFileLength(FILE *filePtr) { return (filelength(fileno(filePtr))); }

Callers 1

cf_DiffFunction · 0.50

Calls 1

_statClass · 0.70

Tested by

no test coverage detected