| 154 | } |
| 155 | |
| 156 | bool cbm_file_exists(const char *path) { |
| 157 | wchar_t *wpath = cbm_path_to_wide(path); |
| 158 | if (!wpath) { |
| 159 | return false; |
| 160 | } |
| 161 | DWORD attr = GetFileAttributesW(wpath); |
| 162 | free(wpath); |
| 163 | return attr != INVALID_FILE_ATTRIBUTES; |
| 164 | } |
| 165 | |
| 166 | bool cbm_is_dir(const char *path) { |
| 167 | wchar_t *wpath = cbm_path_to_wide(path); |