| 180 | } |
| 181 | |
| 182 | FileInfo Doom3FileSystem::getFileInfo(const std::string& vfsRelativePath) |
| 183 | { |
| 184 | for (const auto& descriptor : _archives) |
| 185 | { |
| 186 | if (!descriptor.archive->containsFile(vfsRelativePath)) |
| 187 | { |
| 188 | continue; |
| 189 | } |
| 190 | |
| 191 | // Determine the visibility of this file |
| 192 | auto topLevelDir = os::getToplevelDirectory(vfsRelativePath); |
| 193 | |
| 194 | auto visibility = Visibility::NORMAL; |
| 195 | auto assetsList = findAssetsList(topLevelDir); |
| 196 | |
| 197 | if (assetsList) |
| 198 | { |
| 199 | // Information in the assets list file are relative to the top-level dir |
| 200 | auto relativePath = os::getRelativePath(vfsRelativePath, topLevelDir); |
| 201 | visibility = assetsList->getVisibility(relativePath); |
| 202 | } |
| 203 | |
| 204 | return FileInfo("", vfsRelativePath, visibility, *descriptor.archive); |
| 205 | } |
| 206 | |
| 207 | return FileInfo(); |
| 208 | } |
| 209 | |
| 210 | ArchiveFilePtr Doom3FileSystem::openFile(const std::string& filename) |
| 211 | { |
no test coverage detected