| 82 | } |
| 83 | |
| 84 | uint32_t Utils::GetFileTime(const string &filename) { |
| 85 | if (filename.empty()) |
| 86 | return 0; |
| 87 | |
| 88 | struct stat statbuf; |
| 89 | if (stat(filename.c_str(), &statbuf) == -1) { |
| 90 | return -1; |
| 91 | } |
| 92 | return statbuf.st_mtime; |
| 93 | } |
| 94 | |
| 95 | int Utils::FileCmpByFileTime(const string &file1, const string &file2) { |
| 96 | uint32_t time1 = GetFileTime(file1); |