www.delorie.com/djgpp/doc/libc/libc_699.html   search  
libc.a reference

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

setftime

Syntax

 
#include <dos.h>

int setftime(int handle, struct ftime *ftimep);

Description

This function sets the modification time of a file. Note that since writing to a file and closing a file opened for writing also sets the modification time, you should only use this function on files opened for reading.

See section getftime, for the description of struct ftime.

Return Value

Zero on success, nonzero on failure.

Portability

ANSI/ISO C No
POSIX No

Example

 
int q = open("data.txt", O_RDONLY);
struct ftime f;
f.ft_tsec = f.ft_min = f.ft_hour = f.ft_day = f.ft_month = f.ft_year = 0;
setftime(q, &f);
close(q);


  webmaster     delorie software   privacy  
  Copyright © 2004     Updated Apr 2004