xref: /original-bsd/lib/libc/gen/utime.3 (revision 42f60e33)
1.\" Copyright (c) 1980, 1991, 1993
2.\"	The Regents of the University of California.  All rights reserved.
3.\"
4.\" %sccs.include.redist.man%
5.\"
6.\"     @(#)utime.3	8.1 (Berkeley) 06/04/93
7.\"
8.Dd
9.Dt UTIME 3
10.Os BSD 4
11.Sh NAME
12.Nm utime
13.Nd set file times
14.Sh SYNOPSIS
15.Fd #include <sys/types.h>
16.Fd #include <utime.h>
17.Ft int
18.Fn utime "const char *file" "const struct utimbuf *timep"
19.Sh DESCRIPTION
20.Bf -symbolic
21This interface is obsoleted by utimes(2) .
22.Ef
23.Pp
24The
25.Fn utime
26function sets the access and modification times of the named file from
27the structures in the argument array
28.Fa timep .
29.Pp
30If the times are specified (the
31.Fa timep
32argument is
33.Pf non- Dv NULL )
34the caller must be the owner of the file or be the super-user.
35.Pp
36If the times are not specified (the
37.Fa timep
38argument is
39.Dv NULL )
40the caller must be the owner of the file, have permission to write
41the file, or be the super-user.
42.Sh ERRORS
43The
44.Fn utime
45function may fail and set
46.Va errno
47for any of the errors specified for the library function
48.Xr utimes 2 .
49.Sh SEE ALSO
50.Xr utimes 2 ,
51.Xr stat 2
52.Sh HISTORY
53A
54.Fn utime
55function appeared in
56.At v7 .
57.Sh STANDARDS
58The
59.Nm utime
60function conforms to
61.St -p1003.1-88 .
62