MCPcopy Create free account
hub / github.com/OpenRCT2/OpenRCT2 / GetLastModified

Function GetLastModified

src/openrct2/platform/Platform.Android.cpp:174–189  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

172 }
173
174 uint64_t GetLastModified(std::string_view path)
175 {
176 if (String::startsWith(path, Platform::kAndroidAssetPathPrefix))
177 {
178 // Assets don't have a modification time in the traditional sense.
179 return 0;
180 }
181
182 uint64_t lastModified = 0;
183 struct stat statInfo{};
184 if (stat(std::string(path).c_str(), &statInfo) == 0)
185 {
186 lastModified = statInfo.st_mtime;
187 }
188 return lastModified;
189 }
190
191 uint64_t GetFileSize(std::string_view path)
192 {

Callers 1

FileGetModifiedTimeFunction · 0.70

Calls 2

startsWithFunction · 0.85
statClass · 0.70

Tested by

no test coverage detected