MCPcopy Create free account
hub / github.com/alliedmodders/sourcemod / GetFileModTime

Function GetFileModTime

core/logic/GameConfigs.cpp:153–168  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

151}
152
153static inline time_t GetFileModTime(const char *path)
154{
155 char filepath[PLATFORM_MAX_PATH];
156 g_pSM->BuildPath(Path_SM, filepath, sizeof(filepath), "gamedata/%s.txt", path);
157#ifdef PLATFORM_WINDOWS
158 struct _stat64 s;
159 if (_stat64(filepath, &s) != 0)
160#elif defined PLATFORM_POSIX
161 struct stat s;
162 if (stat(filepath, &s) != 0)
163#endif
164 {
165 return 0;
166 }
167 return s.st_mtime;
168}
169
170CGameConfig::CGameConfig(const char *file, const char *engine)
171{

Callers 2

CGameConfigMethod · 0.85
LoadGameConfigFileMethod · 0.85

Calls 3

_stat64Class · 0.85
BuildPathMethod · 0.80
statClass · 0.70

Tested by

no test coverage detected