| 162 | } |
| 163 | |
| 164 | bool cbm_is_dir(const char *path) { |
| 165 | wchar_t *wpath = cbm_path_to_wide(path); |
| 166 | if (!wpath) { |
| 167 | return false; |
| 168 | } |
| 169 | DWORD attr = GetFileAttributesW(wpath); |
| 170 | free(wpath); |
| 171 | return attr != INVALID_FILE_ATTRIBUTES && (attr & FILE_ATTRIBUTE_DIRECTORY); |
| 172 | } |
| 173 | |
| 174 | int64_t cbm_file_size(const char *path) { |
| 175 | wchar_t *wpath = cbm_path_to_wide(path); |