futimes

Name

futimes, lutimes -- set file access and modification times

Synopsis

#include <sys/time.h>

int futimes(int fd, const struct timeval tv[2]);

int lutimes(const char * filename, const struct timeval tv[2]);

Description

The futimes() and lutimes() functions shall set the access and modification times of a file to the values of the tv argument, which is an array of two timeval structures. The behavior is as for utimes() in POSIX 1003.1-2008 (ISO/IEC 9945-2009).

The futimes() function shall change the times of of the open file described by file descriptor fd.

The lutimes() function shall change the times of of the file pointed to by the filename argument, except that if filename refers to a symbolic link, then the link is not followed and the times of the symbolic link are changed. This is similar to supplying AT_SYMLINK_NOFOLLOW in the flag argument to the utimensat() function.

Errors

As for utimes(), but in addition:

ENOSYS 

Ths implementation does not support this function (for lutimes()).

The implementation could not access a resource needed to complete the function (for futimes()).

See Also

utimes(), utime(), utimensat().