| 72 | } |
| 73 | |
| 74 | std::optional<IsoReader::ISODirectoryEntry> IsoReader::LocateFile(const std::string_view path, Error* error) |
| 75 | { |
| 76 | const ISODirectoryEntry* root_de = reinterpret_cast<const ISODirectoryEntry*>(m_pvd.root_directory_entry); |
| 77 | if (path.empty() || path == "/" || path == "\\") |
| 78 | { |
| 79 | // locating the root directory |
| 80 | return *root_de; |
| 81 | } |
| 82 | |
| 83 | // start at the root directory |
| 84 | u8 sector_buffer[SECTOR_SIZE]; |
| 85 | return LocateFile(path, sector_buffer, root_de->location_le, root_de->length_le, error); |
| 86 | } |
| 87 | |
| 88 | std::string_view IsoReader::GetDirectoryEntryFileName(const u8* sector, u32 de_sector_offset) |
| 89 | { |
no test coverage detected