Revision: | 2.1 |
Committed: | Wed Mar 10 19:39:54 1993 UTC (32 years, 2 months ago) by greg |
Content type: | text/plain |
Branch: | MAIN |
Log Message: | Initial revision |
# | User | Rev | Content |
---|---|---|---|
1 | greg | 2.1 | /* Copyright (c) 1993 Regents of the University of California */ |
2 | |||
3 | #ifndef lint | ||
4 | static char SCCSid[] = "$SunId$ LBL"; | ||
5 | #endif | ||
6 | |||
7 | /* | ||
8 | * Return file date (UNIX seconds as returned by time(2) call) | ||
9 | */ | ||
10 | |||
11 | #include <sys/types.h> | ||
12 | #include <sys/stat.h> | ||
13 | |||
14 | |||
15 | long | ||
16 | fdate(fname) /* get file date */ | ||
17 | char *fname; | ||
18 | { | ||
19 | struct stat sbuf; | ||
20 | |||
21 | if (stat(fname, &sbuf) == -1) | ||
22 | return(-1); | ||
23 | |||
24 | return(sbuf.st_mtime); | ||
25 | } |