home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The C Users' Group Library 1994 August
/
wc-cdrom-cusersgrouplibrary-1994-08.iso
/
listings
/
v_11_01
/
1101118c
< prev
next >
Wrap
Text File
|
1992-11-03
|
302b
|
19 lines
/* touch.c: Update a file's time stamp */
#include <stdio.h>
void touch(char *fname)
{
FILE *f = fopen(fname,"r+b");
if (f != NULL)
{
char c = getc(f);
rewind(f);
putc(c,f);
}
else
fopen(fname,"wb");
fclose(f);
}