Go to the previous, next section.

utime

SYNOPSIS

int utime(const char *filename, struct utimbuf *buf);

PARAMETERS

filename: [in] points to the path of the file to change.

buf: [in] points to the new times.

DESCRIPTION

Changes the access and modification times of a inode. The utimbuf structure has the following layout:

struct utimbuf {
        time_t actime;  /* access time */
        time_t modtime; /* modification time */
};

If buf is NULL the times are set to the current time.

RETURN VALUE

On success, returns zero. On error, returns -1 and sets errno to one of the following value:

Go to the previous, next section.