*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> standard/utimets (2)              
Title
Content
Arch
Section
 

Contents


UTIMETS(2)							    UTIMETS(2)


NAME    [Toc]    [Back]

     utimets - set file	access and modification	times

SYNOPSIS    [Toc]    [Back]

     #include <sys/time.h>

     utimets(const char	*file, const struct timespec timets[2]);

DESCRIPTION    [Toc]    [Back]

     The utimets call uses the "accessed" and "updated"	times in that order
     from the timets vector to set the corresponding recorded times for	file.

     The caller	must be	the owner of the file or have write permission to use
     utimets in	this manner.

     This routine is not part of any standard and is specific to IRIX 6.5.10
     and later.	 Applications that call	utimets	may be run under earlier
     versions of IRIX if they test for the existence of	the interface and fall
     back to using one of the older file time setting interfaces:

	    #include <optional_sym.h>

	    if (_MIPS_SYMBOL_PRESENT(utimets)) {
		  utimets(file,	ts);
	    } else {
		  struct utimbuf tb;
		  tb.actime = ts[0].tv_sec;
		  tb.modtime = ts[1].tv_sec;
		  utime(file, &tb);
	    }

RETURN VALUE    [Toc]    [Back]

     Upon successful completion, a value of 0 is returned.  Otherwise, a value
     of	-1 is returned and errno is set	to indicate the	error.	utimets	will
     fail if one or more of the	following are true:

     [ENOTDIR]	    A component	of the path prefix is not a directory.

     [EINVAL]	    The	pathname contains a character with the high-order bit
		    set.

     [ENAMETOOLONG] A component	of a pathname exceeded 255 characters, or an
		    entire path	name exceeded 1023 characters.

     [ENOENT]	    The	named file does	not exist.

     [ELOOP]	    Too	many symbolic links were encountered in	translating
		    the	pathname.






									Page 1






UTIMETS(2)							    UTIMETS(2)



     [EPERM]	    The	process	is not super-user and not the owner of the
		    file.

     [EACCES]	    Search permission is denied	for a component	of the path
		    prefix.

     [EROFS]	    The	file system containing the file	is mounted read-only.

     [EFAULT]	    File or timets points outside the process's	allocated
		    address space.

     [EIO]	    An I/O error occurred while	reading	or writing the
		    affected inode.

SEE ALSO    [Toc]    [Back]

      
      
     stat(2), utime(2)


									PPPPaaaaggggeeee 2222
[ Back ]
 Similar pages
Name OS Title
touch Tru64 Updates file access and modification times
touch IRIX update access and modification times of a file
touch OpenBSD change file access and modification times
pxfutime IRIX Sets access and modification times of a file
touch FreeBSD change file access and modification times
touch HP-UX update access, modification, and/or change times of file
utime Linux change access and/or modification times of an inode
settime IRIX change the access and modification dates of files
utime OpenBSD set file times
utime FreeBSD set file times
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service