UTIMES(2)                        System Calls                        UTIMES(2)




NAME

       utimes - set file access and modification times


SYNOPSIS

       #include <sys/time.h>

       int utimes (const char *file, const struct timeval *times);


DESCRIPTION

       The utimes function sets the access and modification times of the named
       file from the structures in the argument array times.

       The first structure is the access time, and the second is the modifica‐
       tion time.

       If  the times are specified (the times argument is non-NULL) the caller
       must be the owner of the file or be the super-user.

       If the times are not specified (the times argument is NULL) the  caller
       must be the owner of the file, have permission to write the file, or be
       the super-user.


RETURN VALUES

       Upon successful completion, a value of 0  is  returned.   Otherwise,  a
       value of -1 is returned and errno is set to indicate the error.


ERRORS

       Utimes may fail and return any error that may be returned by __C2GSMAL
       LOC(3) or the GS/OS system calls GetFileInfoGS or SetFileInfoGS.


BUGS

       The restrictions on ownership listed above are not enforced  under  GNO
       since there is no concept of file ownership.


SEE ALSO

       __C2GSMALLOC(3), GS/OS Refence Manual.


HISTORY

       The utimes function call appeared in 4.2BSD.



GNO                             6 January 1997                       UTIMES(2)

Man(1) output converted with man2html