| 43 | } |
| 44 | |
| 45 | bool Platform::File::Exists() const { |
| 46 | #ifdef _WIN32 |
| 47 | return ::GetFileAttributesW(filename.c_str()) != (DWORD)-1; |
| 48 | #elif defined(__vita__) |
| 49 | struct SceIoStat sb; |
| 50 | return (::sceIoGetstat(filename.c_str(), &sb) >= 0); |
| 51 | #else |
| 52 | return ::access(filename.c_str(), F_OK) != -1; |
| 53 | #endif |
| 54 | } |
| 55 | |
| 56 | bool Platform::File::IsFile(bool follow_symlinks) const { |
| 57 | return GetType(follow_symlinks) == FileType::File; |
no outgoing calls
no test coverage detected