[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
Function fileexist - does a file exist
Syntax boolean fileexist(char *filename);
Prototype in filehk.h
Remarks checks if a file entry exists. The string filename
should be a standard DOS filename, with optional
drive and/or path. Files with hidden or system
attributes will not be found (searches are done via
findfirst() with 0 as an attribute byte).
Wildcards (*,?) are supported.
This function does not harm the dta. The dta is
modified by this function, but restored before
returning.
Return value returns TRUE if filename exists, FALSE if filename
does not exist. If an error occurs, FALSE will be
returned and Borland's variable errno will contain
the error code.
See also isdir()
Example #include <filehk.h>
main()
{
char fname[] = "a:\tchks.lib";
printf("%s is ",fname);
if (! fileexist(fname))
printf("not ");
printf("found\n");
}
See Also:
isdir()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson