Adding basic imputil documentation.
[python.git] / Python / getmtime.c
blob54edb531df9f07b20583f323f1894881f20ba73c
2 /* Subroutine to get the last modification time of a file */
4 /* (A separate file because this may be OS dependent) */
6 #include "Python.h"
7 #include "pyconfig.h"
9 #ifdef __cplusplus
10 extern "C" {
11 #endif
13 time_t
14 PyOS_GetLastModificationTime(char *path, FILE *fp)
16 struct stat st;
17 if (fstat(fileno(fp), &st) != 0)
18 return -1;
19 else
20 return st.st_mtime;
23 #ifdef __cplusplus
25 #endif