From: Robert Latest on
Hello folks,

I'm looking for a C function that can change the mtime of a file. Of
course I could just look up the source for "touch", but then we didn't
need Usenet any more.

Thanks,
robert
From: Rainer Weikusat on
Robert Latest <boblatest(a)yahoo.com> writes:
> I'm looking for a C function that can change the mtime of a file.

utime/ utimes

(the mail was an error)
From: Robert Latest on
Rainer Weikusat wrote:
> Robert Latest <boblatest(a)yahoo.com> writes:
>> I'm looking for a C function that can change the mtime of a file.
>
> utime/ utimes

Thanks. I knew it had to be something that simple.

robert
From: Ersek, Laszlo on
In article <87hbq07p2s.fsf(a)fever.mssgmbh.com>, Rainer Weikusat <rweikusat(a)mssgmbh.com> writes:
> Robert Latest <boblatest(a)yahoo.com> writes:
>> I'm looking for a C function that can change the mtime of a file.
>
> utime/ utimes

Or for newer systems: futimens()

http://www.opengroup.org/onlinepubs/9699919799/functions/futimens.html

Cheers,
lacos
From: Scott Lurndal on
Robert Latest <boblatest(a)yahoo.com> writes:
>Hello folks,
>
>I'm looking for a C function that can change the mtime of a file. Of
>course I could just look up the source for "touch", but then we didn't
>need Usenet any more.
>
>Thanks,
>robert

$ man -k modification
newer (1) - compare file modification times
sys/times.h [sys_times] (0p) - file access and modification times structure
touch (1p) - change file access and modification times
utime (2) - change access and/or modification times of an inode
utime (3p) - set file access and modification times
utime.h [utime] (0p) - access and modification times structure
utimes (3p) - set file access and modification times (LEGACY)
utimes [utime] (2) - change access and/or modification times of an inode