Added getNativePath() method to get the OS version of a virtual path.
This commit is contained in:
@@ -41,6 +41,7 @@ public:
|
||||
fs::path getHomeFolder() override;
|
||||
std::vector<FileInfo> listFiles(const fs::path& folder) override;
|
||||
FileInfo getFileInfo(const fs::path& file) override;
|
||||
Optional<fs::path> getNativePath(const fs::path& file) override;
|
||||
StreamError open(const fs::path& path, FileOpenMode mode, std::unique_ptr<Stream>& outStream) override;
|
||||
private:
|
||||
fs::path appendPath(const fs::path& other) const noexcept;
|
||||
@@ -80,6 +81,12 @@ FileInfo RelativeFileSystemAdapter<TWrapped>::getFileInfo(const fs::path& file)
|
||||
return wrapped_.getFileInfo(appendPath(file));
|
||||
}
|
||||
|
||||
template<typename TWrapped>
|
||||
Optional<fs::path> RelativeFileSystemAdapter<TWrapped>::getNativePath(const fs::path& file)
|
||||
{
|
||||
return wrapped_.getNativePath(appendPath(file));
|
||||
}
|
||||
|
||||
template<typename TWrapped>
|
||||
StreamError RelativeFileSystemAdapter<TWrapped>::open(const fs::path& path, FileOpenMode mode, std::unique_ptr<Stream>& outStream)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user