is_file.h 587 B

12345678910111213141516171819202122
  1. #ifndef IGL_IS_FILE_H
  2. #define IGL_IS_FILE_H
  3. #include "igl_inline.h"
  4. namespace igl
  5. {
  6. // Act like php's is_file function
  7. // http://php.net/manual/en/function.is-file.php
  8. // Tells whether the given filename is a regular file.
  9. // Input:
  10. // filename Path to the file. If filename is a relative filename, it will
  11. // be checked relative to the current working directory.
  12. // Returns TRUE if the filename exists and is a regular file, FALSE
  13. // otherwise.
  14. IGL_INLINE bool is_file(const char * filename);
  15. }
  16. #ifdef IGL_HEADER_ONLY
  17. # include "is_file.cpp"
  18. #endif
  19. #endif