| 255 | #endif |
| 256 | |
| 257 | Platform::FileType Platform::Directory::GetEntryType() const { |
| 258 | assert(valid_entry); |
| 259 | |
| 260 | #if defined(__vita__) |
| 261 | return SCE_S_ISREG(entry.d_stat.st_mode) ? FileType::File : |
| 262 | SCE_S_ISDIR(entry.d_stat.st_mode) ? FileType::Directory : FileType::Other; |
| 263 | #elif defined(_WIN32) |
| 264 | int attribs = entry.dwFileAttributes; |
| 265 | if (attribs == INVALID_FILE_ATTRIBUTES) { |
| 266 | return FileType::Unknown; |
| 267 | } else if ((attribs & FILE_ATTRIBUTE_DIRECTORY) == 0) { |
| 268 | return FileType::File; |
| 269 | } else if ((attribs & (FILE_ATTRIBUTE_DIRECTORY | FILE_ATTRIBUTE_REPARSE_POINT)) == FILE_ATTRIBUTE_DIRECTORY) { |
| 270 | return FileType::Directory; |
| 271 | } |
| 272 | return FileType::Other; |
| 273 | #else |
| 274 | return ::GetEntryType(entry); |
| 275 | #endif |
| 276 | } |
| 277 | |
| 278 | void Platform::Directory::Close() { |
| 279 | if (*this) { |
no test coverage detected