Staging
v0.5.1
https://github.com/python/cpython
Revision 5125773ff133bfddbea6354c688b084bbf5d7e79 authored by Jeremy Hylton on 01 March 2001, 00:42:55 UTC, committed by Jeremy Hylton on 01 March 2001, 00:42:55 UTC
1 parent cd81ea1
Raw File
Tip revision: 5125773ff133bfddbea6354c688b084bbf5d7e79 authored by Jeremy Hylton on 01 March 2001, 00:42:55 UTC
Don't add global names to st->st_global if we're already iterating
Tip revision: 5125773
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 "config.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