home *** CD-ROM | disk | FTP | other *** search
/ Black Box 4 / BlackBox.cdr / progc / cfuncs.arj / FEXISTS.C < prev    next >
Encoding:
Text File  |  1991-09-09  |  521 b   |  18 lines

  1. /*-------------------FileExists----------------------------*/
  2. /*DESCRIPTION: Tests whether or not a file exists on the   */
  3. /*    current directory.                   */
  4. /*                               */
  5. /*INPUT: file name                       */
  6. /*RETURNS: 1 if the file exists                   */
  7. /*       0 if the file does not exist                    */
  8. /*USES: nothing                           */
  9. /*---------------------------------------------------------*/
  10.  
  11. int FileExists(const char *filename)
  12. {
  13.     int access(const char *path, int mode);
  14.  
  15.     return(access(filename, 0)==0);
  16. }
  17.  
  18.