Added getNativePath() method to get the OS version of a virtual path.

This commit is contained in:
2024-07-27 11:04:38 +02:00
parent 9b4425c495
commit e82c697d2e
5 changed files with 35 additions and 0 deletions

View File

@@ -90,6 +90,19 @@ FileInfo StackedFileSystemAdapter::getFileInfo(const fs::path& file)
return {};
}
Optional<fs::path> StackedFileSystemAdapter::getNativePath(const fs::path& file)
{
for (auto& adapter : adapters_)
{
Optional<fs::path> result = adapter->getNativePath(file);
if (!result.empty())
{
return result;
}
}
return NULL_OPTIONAL;
}
StreamError StackedFileSystemAdapter::open(const fs::path& path, FileOpenMode mode, std::unique_ptr<Stream>& outStream)
{
for (auto& adapter : adapters_)