Trailing-Edge
-
PDP-10 Archives
-
SRI_NIC_PERM_FS_1_19910112
-
kcc-5/lib/test/tutime.c
There are 4 other files named tutime.c in the archive. Click here to see a list.
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
struct stat fbuf;
time_t timep[2];
main(argc, argv)
int argc;
char **argv;
{
FILE *infile;
if ((infile = fopen(argv[1], "r")) == NULL) {
perror (argv[1]);
exit(0);
}
fstat(fileno(infile), &fbuf);
fclose(infile);
timep[0] = fbuf.st_atime;
timep[1] = fbuf.st_mtime;
utime(argv[1], timep);
}