MCPcopy Create free account
hub / github.com/Tencent/phxsql / GetFileTime

Method GetFileTime

phxcomm/utils/phx_utils.cpp:84–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82}
83
84uint32_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
95int Utils::FileCmpByFileTime(const string &file1, const string &file2) {
96 uint32_t time1 = GetFileTime(file1);

Callers

nothing calls this directly

Calls 1

statClass · 0.70

Tested by

no test coverage detected