https://github.com/python/cpython
Raw File
Tip revision: b4c8cba4b4405f5abf394ffc8286a1dd13732a8f authored by Anthony Baxter on 23 October 2006, 15:38:59 UTC
set svn:ignore. anal retentiveness, makes it easier to spot actual problems
Tip revision: b4c8cba
getmtime.c

/* Subroutine to get the last modification time of a file */

/* (A separate file because this may be OS dependent) */

#include "Python.h"
#include "pyconfig.h"

time_t
PyOS_GetLastModificationTime(char *path, FILE *fp)
{
	struct stat st;
	if (fstat(fileno(fp), &st) != 0)
		return -1;
	else
		return st.st_mtime;
}
back to top