| 37 | } |
| 38 | |
| 39 | bool MNNCreateDir(const char * path) { |
| 40 | if (MNNDirExist(path)) { |
| 41 | return true; |
| 42 | } |
| 43 | #if defined(WIN32) || defined(_WIN32) || defined(_WIN64) || defined(_MSC_VER) |
| 44 | if (CreateDirectory(path, NULL) || ERROR_ALREADY_EXISTS == GetLastError()) { |
| 45 | return true; |
| 46 | } else { |
| 47 | return false; |
| 48 | } |
| 49 | #else |
| 50 | if (mkdir(path, 0755) == 0) { |
| 51 | return true; |
| 52 | } |
| 53 | return MNNDirExist(path); |
| 54 | #endif |
| 55 | } |
| 56 | |
| 57 | file_t MNNCreateFile(const char * file_name) |
| 58 | { |
no test coverage detected