| 89 | } |
| 90 | |
| 91 | bool DirExists(const char *name) { |
| 92 | // clang-format off |
| 93 | |
| 94 | #ifdef _WIN32 |
| 95 | #define flatbuffers_stat _stat |
| 96 | #define FLATBUFFERS_S_IFDIR _S_IFDIR |
| 97 | #else |
| 98 | #define flatbuffers_stat stat |
| 99 | #define FLATBUFFERS_S_IFDIR S_IFDIR |
| 100 | #endif |
| 101 | // clang-format on |
| 102 | struct flatbuffers_stat file_info; |
| 103 | if (flatbuffers_stat(name, &file_info) != 0) return false; |
| 104 | return (file_info.st_mode & FLATBUFFERS_S_IFDIR) != 0; |
| 105 | } |
| 106 | |
| 107 | LoadFileFunction SetLoadFileFunction(LoadFileFunction load_file_function) { |
| 108 | LoadFileFunction previous_function = g_load_file_function; |
no test coverage detected