file_exists.h 494 B

12345678910111213141516171819
  1. #ifndef IGL_FILE_EXISTS_H
  2. #define IGL_FILE_EXISTS_H
  3. #include "igl_inline.h"
  4. namespace igl
  5. {
  6. // Check if a file or directory exists like PHP's file_exists function:
  7. // http://php.net/manual/en/function.file-exists.php
  8. // Input:
  9. // filename path to file
  10. // Returns true if file exists and is readable and false if file doesn't
  11. // exist or *is not readable*
  12. IGL_INLINE bool file_exists(const char * filename);
  13. }
  14. #ifdef IGL_HEADER_ONLY
  15. # include "file_exists.cpp"
  16. #endif
  17. #endif