Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Borland C++ 2.x ( with Turbo C ) - <b>setftime() set file date and time</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 setftime()              Set File Date and Time

 #include   <io.h>

 int           setftime(handle,ftimep);
 int           handle;                   Handle associated with file
 struct ftime  *ftimep;                  Pointer to structure

    setftime() sets the time and date of a disk file specified by
    'handle' to the time and date in the 'ftime' structure, defined as
    followed, which is pointed to by 'ftimep'.

          struct ftime  {
               unsigned ft_tsec: 5;          /* Two-second intervals */
               unsigned ft_min: 6;           /* Minutes */
               unsigned ft_hour: 5;          /* Hours */
               unsigned ft_day: 5;           /* Days */
               unsigned ft_month: 4;         /* Months */
               unsigned ft_year: 7;          /* Year minus 1980 */

       Returns:     0, if successful.  On error, -1 is returned and
                    'errno' (defined in <errno.h>) is set to one of the
                    following:

                    EINVFNC        Invalid function number
                    EBADF          Bad file number


See Also: getftime()

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