| 1254 | } |
| 1255 | |
| 1256 | uint64_t GetFileSize(const Path& file) { |
| 1257 | if (file.isValid()) { |
| 1258 | FILE* f = my_fopen(file.GetFullPath(), "rb"); |
| 1259 | if (f) { |
| 1260 | fseek(f, 0L, SEEK_END); |
| 1261 | long size_b = ftell(f); |
| 1262 | fclose(f); |
| 1263 | |
| 1264 | return (uint64_t)size_b; |
| 1265 | } else { |
| 1266 | return 0; |
| 1267 | } |
| 1268 | } else { |
| 1269 | return 0; |
| 1270 | } |
| 1271 | } |
| 1272 | |
| 1273 | void CreateBackup(const char* path, int max_backup_count /*= 10*/) { |
| 1274 | pair<string, string> path_file_name = SplitPathFileName(path); |