mirror of
https://github.com/yuzu-mirror/yuzu.git
synced 2024-09-09 14:19:08 +01:00
Service.FS: Rename FileSys::Directory to DirectoryBackend
This commit is contained in:
parent
82fe821e87
commit
d51afab0bc
10 changed files with 18 additions and 18 deletions
|
@ -99,7 +99,7 @@ set(HEADERS
|
|||
file_sys/file.h
|
||||
file_sys/file_romfs.h
|
||||
file_sys/file_sdmc.h
|
||||
file_sys/directory.h
|
||||
file_sys/directory_backend.h
|
||||
file_sys/directory_romfs.h
|
||||
file_sys/directory_sdmc.h
|
||||
hle/kernel/address_arbiter.h
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
#include "common/bit_field.h"
|
||||
|
||||
#include "core/file_sys/file.h"
|
||||
#include "core/file_sys/directory.h"
|
||||
#include "core/file_sys/directory_backend.h"
|
||||
|
||||
#include "core/mem_map.h"
|
||||
#include "core/hle/kernel/kernel.h"
|
||||
|
@ -219,7 +219,7 @@ public:
|
|||
* @param path Path relative to the archive
|
||||
* @return Opened directory, or nullptr
|
||||
*/
|
||||
virtual std::unique_ptr<Directory> OpenDirectory(const Path& path) const = 0;
|
||||
virtual std::unique_ptr<DirectoryBackend> OpenDirectory(const Path& path) const = 0;
|
||||
|
||||
/**
|
||||
* Read data from the archive
|
||||
|
|
|
@ -78,8 +78,8 @@ bool Archive_RomFS::RenameDirectory(const FileSys::Path& src_path, const FileSys
|
|||
* @param path Path relative to the archive
|
||||
* @return Opened directory, or nullptr
|
||||
*/
|
||||
std::unique_ptr<Directory> Archive_RomFS::OpenDirectory(const Path& path) const {
|
||||
return std::unique_ptr<Directory>(new Directory_RomFS);
|
||||
std::unique_ptr<DirectoryBackend> Archive_RomFS::OpenDirectory(const Path& path) const {
|
||||
return std::unique_ptr<DirectoryBackend>(new Directory_RomFS);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -74,7 +74,7 @@ public:
|
|||
* @param path Path relative to the archive
|
||||
* @return Opened directory, or nullptr
|
||||
*/
|
||||
std::unique_ptr<Directory> OpenDirectory(const Path& path) const override;
|
||||
std::unique_ptr<DirectoryBackend> OpenDirectory(const Path& path) const override;
|
||||
|
||||
/**
|
||||
* Read data from the archive
|
||||
|
|
|
@ -97,12 +97,12 @@ bool Archive_SDMC::RenameDirectory(const FileSys::Path& src_path, const FileSys:
|
|||
* @param path Path relative to the archive
|
||||
* @return Opened directory, or nullptr
|
||||
*/
|
||||
std::unique_ptr<Directory> Archive_SDMC::OpenDirectory(const Path& path) const {
|
||||
std::unique_ptr<DirectoryBackend> Archive_SDMC::OpenDirectory(const Path& path) const {
|
||||
LOG_DEBUG(Service_FS, "called path=%s", path.DebugStr().c_str());
|
||||
Directory_SDMC* directory = new Directory_SDMC(this, path);
|
||||
if (!directory->Open())
|
||||
return nullptr;
|
||||
return std::unique_ptr<Directory>(directory);
|
||||
return std::unique_ptr<DirectoryBackend>(directory);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -78,7 +78,7 @@ public:
|
|||
* @param path Path relative to the archive
|
||||
* @return Opened directory, or nullptr
|
||||
*/
|
||||
std::unique_ptr<Directory> OpenDirectory(const Path& path) const override;
|
||||
std::unique_ptr<DirectoryBackend> OpenDirectory(const Path& path) const override;
|
||||
|
||||
/**
|
||||
* Read data from the archive
|
||||
|
|
|
@ -36,10 +36,10 @@ static_assert(offsetof(Entry, extension) == 0x216, "Wrong offset for extension i
|
|||
static_assert(offsetof(Entry, is_archive) == 0x21E, "Wrong offset for is_archive in Entry.");
|
||||
static_assert(offsetof(Entry, file_size) == 0x220, "Wrong offset for file_size in Entry.");
|
||||
|
||||
class Directory : NonCopyable {
|
||||
class DirectoryBackend : NonCopyable {
|
||||
public:
|
||||
Directory() { }
|
||||
virtual ~Directory() { }
|
||||
DirectoryBackend() { }
|
||||
virtual ~DirectoryBackend() { }
|
||||
|
||||
/**
|
||||
* Open the directory
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
#include "common/common_types.h"
|
||||
|
||||
#include "core/file_sys/directory.h"
|
||||
#include "core/file_sys/directory_backend.h"
|
||||
#include "core/loader/loader.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -14,7 +14,7 @@
|
|||
|
||||
namespace FileSys {
|
||||
|
||||
class Directory_RomFS final : public Directory {
|
||||
class Directory_RomFS final : public DirectoryBackend {
|
||||
public:
|
||||
Directory_RomFS();
|
||||
~Directory_RomFS() override;
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#include "common/common_types.h"
|
||||
#include "common/file_util.h"
|
||||
|
||||
#include "core/file_sys/directory.h"
|
||||
#include "core/file_sys/directory_backend.h"
|
||||
#include "core/file_sys/archive_sdmc.h"
|
||||
#include "core/loader/loader.h"
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
|||
|
||||
namespace FileSys {
|
||||
|
||||
class Directory_SDMC final : public Directory {
|
||||
class Directory_SDMC final : public DirectoryBackend {
|
||||
public:
|
||||
Directory_SDMC();
|
||||
Directory_SDMC(const Archive_SDMC* archive, const Path& path);
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
#include "core/file_sys/archive_backend.h"
|
||||
#include "core/file_sys/archive_sdmc.h"
|
||||
#include "core/file_sys/directory.h"
|
||||
#include "core/file_sys/directory_backend.h"
|
||||
#include "core/hle/service/fs/archive.h"
|
||||
#include "core/hle/kernel/session.h"
|
||||
#include "core/hle/result.h"
|
||||
|
@ -186,7 +186,7 @@ public:
|
|||
std::string GetName() const override { return "Directory: " + path.DebugStr(); }
|
||||
|
||||
FileSys::Path path; ///< Path of the directory
|
||||
std::unique_ptr<FileSys::Directory> backend; ///< File backend interface
|
||||
std::unique_ptr<FileSys::DirectoryBackend> backend; ///< File backend interface
|
||||
|
||||
ResultVal<bool> SyncRequest() override {
|
||||
u32* cmd_buff = Kernel::GetCommandBuffer();
|
||||
|
|
Loading…
Reference in a new issue