| 31 | } |
| 32 | |
| 33 | HANDLE CascFileSystem::OpenFile(const std::string& fileName, const std::string& mode) |
| 34 | { |
| 35 | // Casc only supports reading |
| 36 | if (mode != "r") |
| 37 | { |
| 38 | LastErrorCode = 0x345300; |
| 39 | return NULL; |
| 40 | } |
| 41 | |
| 42 | HANDLE result = NULL; |
| 43 | |
| 44 | if (!CascOpenFile(StorageHandle, fileName.c_str(), CASC_LOCALE_NONE, CASC_OPEN_BY_NAME, &result)) |
| 45 | { |
| 46 | LastErrorCode = GetCascError(); |
| 47 | result = NULL; |
| 48 | } |
| 49 | else |
| 50 | { |
| 51 | LastErrorCode = 0; |
| 52 | OpenHandles.push_back(result); |
| 53 | } |
| 54 | |
| 55 | return result; |
| 56 | } |
| 57 | |
| 58 | void CascFileSystem::CloseHandle(HANDLE handle) |
| 59 | { |
nothing calls this directly
no test coverage detected