FS: Allow multiple instances of the same archive type to be open at once
This commit is contained in:
parent
4468625080
commit
3f1a3952d7
19 changed files with 199 additions and 159 deletions
|
@ -4,6 +4,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include "common/common_types.h"
|
||||
|
@ -17,12 +18,16 @@
|
|||
namespace FileSys {
|
||||
|
||||
/// File system interface to the RomFS archive
|
||||
class Archive_RomFS final : public IVFCArchive {
|
||||
class ArchiveFactory_RomFS final : public ArchiveFactory {
|
||||
public:
|
||||
Archive_RomFS(const Loader::AppLoader& app_loader);
|
||||
ArchiveFactory_RomFS(const Loader::AppLoader& app_loader);
|
||||
|
||||
std::string GetName() const override { return "RomFS"; }
|
||||
ResultCode Open(const Path& path) override { return RESULT_SUCCESS; }
|
||||
ResultVal<std::unique_ptr<ArchiveBackend>> Open(const Path& path) override;
|
||||
ResultCode Format(const Path& path) override;
|
||||
|
||||
private:
|
||||
std::shared_ptr<std::vector<u8>> romfs_data;
|
||||
};
|
||||
|
||||
} // namespace FileSys
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue