home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The C Users' Group Library 1994 August
/
wc-cdrom-cusersgrouplibrary-1994-08.iso
/
vol_200
/
272_01
/
eraok.doc
< prev
next >
Wrap
Text File
|
1987-07-10
|
936b
|
39 lines
NAME
eraok -- ask permission before overwriting existing file
SYNOPSIS
void eraok(filename);
char *filename filename to test
DESCRIPTION
This function checks for the existance of the specified filename
and if it exists, will ask the user (through stderr) if the file
can be lost. If the user responds Y or y, the file is lost and
return is made to the caller. If the response is anything else,
the program aborts immediately, and the routine does NOT return
to the caller. Exit is via the aabort() function of this library.
EXAMPLE
(assume argv[1] is string "foobar.com")
eraok(argv[1]);
printf("File %s has been deleted", argv[1]);
This function is found in SMDLx.LIB for the Datalight Compiler.