repo.or.cz
/
python.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Set eol-style to native -- doesn't appear to be any reason
[python.git]
/
Python
/
getmtime.c
blob
f0ac89972000b2370c80a7af9a1d518cc31cc7bf
1
2
/* Subroutine to get the last modification time of a file */
3
4
/* (A separate file because this may be OS dependent) */
5
6
#include
"Python.h"
7
#include
"pyconfig.h"
8
9
time_t
10
PyOS_GetLastModificationTime
(
char
*
path
,
FILE
*
fp
)
11
{
12
struct
stat st
;
13
if
(
fstat
(
fileno
(
fp
), &
st
) !=
0
)
14
return
-
1
;
15
else
16
return
st
.
st_mtime
;
17
}