Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- libc - <b>utime</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
utime
=====

Syntax
------

     #include <utime.h>
     
     int utime(const char *file, const struct utimbuf *time);

Description
-----------

This function sets the modification timestamp on the FILE.  The new
time is stored in this structure:

     struct utimbuf
     {
         time_t  actime;  /* access time (unused on FAT filesystems) */
         time_t  modtime; /* modification time */
     };

Note that, as under DOS a file only has a single timestamp, the
`actime' field of `struct utimbuf' is ignored by this function, and
only `modtime' field is used.  On filesystems which support long
filenames, both fields are used and both access and modification times
are set.

Return Value
------------

Zero for success, nonzero for failure.

Example
-------

     struct utimbuf t;
     t.modtime = time(0);
     utime("data.txt", &t);


Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson