home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Interactive Guide / c-cplusplus-interactive-guide.iso / c_ref / csource4 / 273_01 / filexist.cc < prev    next >
Text File  |  1987-09-25  |  242b  |  13 lines

  1. #include <dir.h>
  2. file_exist(char *fn)
  3. /* Check to see of a Find exists.
  4.     RETURN 1 if exist 0 if not.
  5. */
  6. {
  7.         struct ffblk fb;
  8.         int rc;
  9.         rc=findfirst(fn,&fb,0);
  10.         if(rc==0) return(1);
  11.         return(0);
  12. }
  13.