| 162 | bool ddio_SetWorkingDir(const char *path) { return (SetCurrentDirectory(path)) ? true : false; } |
| 163 | |
| 164 | bool 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 |
| 180 | int ddio_GetFileLength(FILE *filePtr) { return (filelength(fileno(filePtr))); } |