2 Copyright © 1995-2013, The AROS Development Team. All rights reserved.
5 POSIX.1-2008 function utime().
12 /*****************************************************************************
22 const struct utimbuf
*buf
)
25 Change last access and last modification time of the given file to
26 times specified in given utimbuf structure. If buf is NULL, the
27 current time will be used instead.
29 The utimbuf structure contains of two fields:
31 time_t actime; - last access time
32 time_t modtime; - last modification time
35 filename - Name of the file
36 buf - Pointer to utimbuf structure describing specified time.
39 0 on success and -1 on error. If an error occurred, the global
40 variable errno is set.
43 This function can be used to set access and modification times with
44 a resolution of 1 second, use utimes() if you need better precision.
49 Since AROS has no notion of last access time, actime field is silently
50 ignored, only modification time of the file is set.
57 ******************************************************************************/
63 time_t tt
= time( NULL
);
70 ts
[0].tv_sec
= buf
->actime
;
71 ts
[1].tv_sec
= buf
->modtime
;
77 return utimes(filename
, ts
);