UTIMESection: Linux Programmer's Manual (2)Updated: 1995-06-10 |
UTIMESection: Linux Programmer's Manual (2)Updated: 1995-06-10 |
#include <sys/types.h>
#include <utime.h> int utime(const char *filename, const struct utimbuf *buf); #include <sys/time.h> int utimes(char *filename, struct timeval *tvp);
struct utimbuf {
time_t actime; /* access time */
time_t modtime; /* modification time */
};
In the Linux DLL 4.4.1 libraries, utimes is just a wrapper for utime: tvp[0].tv_sec is actime, and tvp[1].tv_sec is modtime. The timeval structure is:
struct timeval {
long tv_sec; /* seconds */
long tv_usec; /* microseconds */
};