Staging
v0.8.1
https://github.com/python/cpython
Revision d434e9f672961946e8c2cbe603f23dd275546bb2 authored by Barry Warsaw on 07 November 2008, 03:08:42 UTC, committed by Barry Warsaw on 07 November 2008, 03:08:42 UTC
1 parent f913ac7
Raw File
Tip revision: d434e9f672961946e8c2cbe603f23dd275546bb2 authored by Barry Warsaw on 07 November 2008, 03:08:42 UTC
De-tagging
Tip revision: d434e9f
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"

#ifdef __cplusplus
extern "C" {
#endif

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

#ifdef __cplusplus
}
#endif

back to top