is_readable.h 555 B

123456789101112131415161718192021
  1. #ifndef IGL_IS_READABLE_H
  2. #define IGL_IS_READABLE_H
  3. #include "igl_inline.h"
  4. namespace igl
  5. {
  6. // Check if a file is reabable like PHP's is_readable function:
  7. // http://www.php.net/manual/en/function.is-readable.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. //
  13. // Note: Windows version will not check user or group ids
  14. IGL_INLINE bool is_readable(const char * filename);
  15. }
  16. #ifdef IGL_HEADER_ONLY
  17. # include "is_readable.cpp"
  18. #endif
  19. #endif