MCPcopy Create free account
hub / github.com/Icinga/icinga2 / GetCtime

Function GetCtime

lib/cli/objectlistcommand.cpp:48–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46}
47
48static time_t GetCtime(const String& path)
49{
50#ifdef _WIN32
51 struct _stat statbuf;
52 int rc = _stat(path.CStr(), &statbuf);
53#else /* _WIN32 */
54 struct stat statbuf;
55 int rc = stat(path.CStr(), &statbuf);
56#endif /* _WIN32 */
57
58 return rc ? 0 : statbuf.st_ctime;
59}
60
61/**
62 * The entry point for the "object list" CLI command.

Callers 1

RunMethod · 0.85

Calls 3

CStrMethod · 0.80
_statClass · 0.70
statClass · 0.70

Tested by

no test coverage detected