2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
9 /*****************************************************************************
22 Change last access and last modification time of the given file to
23 times specified in given utimbuf structure. If buf is NULL, the
24 current time will be used instead.
26 The utimbuf structure contains of two fields:
28 time_t actime; - last access time
29 time_t modtime; - last modification time
32 filename - Name of the file
33 buf - Pointer to utimbuf structure describing specified time.
36 0 on success and -1 on error. If an error occurred, the global
37 variable errno is set.
40 This function can be used to set access and modification times with
41 a resolution of 1 second, use utimes() if you need better precision.
46 Since AROS has no notion of last access time, actime field is silently
47 ignored, only modification time of the file is set.
54 ******************************************************************************/
60 time_t tt
= time( NULL
);
67 ts
[0].tv_sec
= buf
->actime
;
68 ts
[1].tv_sec
= buf
->modtime
;
74 return utimes(filename
, ts
);