MCPcopy Create free account
hub / github.com/1a1a11a/libCacheSim / file_modtime

Function file_modtime

libCacheSim/dataStructure/ketama/ketama.c:207–217  ·  view source on GitHub ↗

\brief Retrieve the modification time of a file. * \param filename The full path to the file. * \return The timestamp of the latest modification to the file. */

Source from the content-addressed store, hash-verified

205 * \param filename The full path to the file.
206 * \return The timestamp of the latest modification to the file. */
207static time_t
208file_modtime( char* filename )
209{
210 struct tm* clock;
211 struct stat attrib;
212
213 stat( filename, &attrib );
214 clock = gmtime( &( attrib.st_mtime ) );
215
216 return mktime( clock );
217}
218
219
220/** \brief Retrieve a serverinfo struct for one a sever definition.

Callers 2

ketama_create_continuumFunction · 0.70
ketama_rollFunction · 0.70

Calls 1

statClass · 0.70

Tested by

no test coverage detected