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