diff --git a/Core/FileSystems/BlobFileSystem.cpp b/Core/FileSystems/BlobFileSystem.cpp index 8ab517da7c..46f22085e5 100644 --- a/Core/FileSystems/BlobFileSystem.cpp +++ b/Core/FileSystems/BlobFileSystem.cpp @@ -128,11 +128,6 @@ bool BlobFileSystem::RemoveFile(const std::string &filename) { return false; } -bool BlobFileSystem::GetHostPath(const std::string &inpath, Path &outpath) { - outpath = fileLoader_->GetPath(); - return true; -} - u64 BlobFileSystem::FreeSpace(const std::string &path) { return 0; } diff --git a/Core/FileSystems/BlobFileSystem.h b/Core/FileSystems/BlobFileSystem.h index e4965f8683..faab90004a 100644 --- a/Core/FileSystems/BlobFileSystem.h +++ b/Core/FileSystems/BlobFileSystem.h @@ -52,7 +52,6 @@ public: bool RmDir(const std::string &dirname) override; int RenameFile(const std::string &from, const std::string &to) override; bool RemoveFile(const std::string &filename) override; - bool GetHostPath(const std::string &inpath, Path &outpath) override; u64 FreeSpace(const std::string &path) override; private: diff --git a/Core/FileSystems/DirectoryFileSystem.cpp b/Core/FileSystems/DirectoryFileSystem.cpp index b265b74759..fb7f0eed68 100644 --- a/Core/FileSystems/DirectoryFileSystem.cpp +++ b/Core/FileSystems/DirectoryFileSystem.cpp @@ -764,12 +764,6 @@ PSPFileInfo DirectoryFileSystem::GetFileInfo(std::string filename) { return ReplayApplyDiskFileInfo(x, CoreTiming::GetGlobalTimeUs()); } -// Same as GetLocalPath. Confusing. -bool DirectoryFileSystem::GetHostPath(const std::string &inpath, Path &outpath) { - outpath = GetLocalPath(inpath); - return true; -} - #ifdef _WIN32 #define FILETIME_FROM_UNIX_EPOCH_US 11644473600000000ULL @@ -1174,12 +1168,6 @@ size_t VFSFileSystem::SeekFile(u32 handle, s32 position, FileMove type) { } } - -bool VFSFileSystem::GetHostPath(const std::string &inpath, Path &outpath) { - // NOT SUPPORTED - return false; -} - std::vector VFSFileSystem::GetDirListing(std::string path) { std::vector myVector; // TODO diff --git a/Core/FileSystems/DirectoryFileSystem.h b/Core/FileSystems/DirectoryFileSystem.h index 98465b8548..2c7a2ca709 100644 --- a/Core/FileSystems/DirectoryFileSystem.h +++ b/Core/FileSystems/DirectoryFileSystem.h @@ -109,7 +109,6 @@ public: bool RmDir(const std::string &dirname) override; int RenameFile(const std::string &from, const std::string &to) override; bool RemoveFile(const std::string &filename) override; - bool GetHostPath(const std::string &inpath, Path &outpath) override; FileSystemFlags Flags() override { return flags; } u64 FreeSpace(const std::string &path) override; @@ -154,7 +153,6 @@ public: bool RmDir(const std::string &dirname) override; int RenameFile(const std::string &from, const std::string &to) override; bool RemoveFile(const std::string &filename) override; - bool GetHostPath(const std::string &inpath, Path &outpath) override; FileSystemFlags Flags() override { return FileSystemFlags::FLASH; } u64 FreeSpace(const std::string &path) override { return 0; } diff --git a/Core/FileSystems/FileSystem.h b/Core/FileSystems/FileSystem.h index 69a0f13eb6..87e8c92e07 100644 --- a/Core/FileSystems/FileSystem.h +++ b/Core/FileSystems/FileSystem.h @@ -131,7 +131,6 @@ public: virtual bool RmDir(const std::string &dirname) = 0; virtual int RenameFile(const std::string &from, const std::string &to) = 0; virtual bool RemoveFile(const std::string &filename) = 0; - virtual bool GetHostPath(const std::string &inpath, Path &outpath) = 0; virtual int Ioctl(u32 handle, u32 cmd, u32 indataPtr, u32 inlen, u32 outdataPtr, u32 outlen, int &usec) = 0; virtual PSPDevType DevType(u32 handle) = 0; virtual FileSystemFlags Flags() = 0; @@ -157,7 +156,6 @@ public: virtual bool RmDir(const std::string &dirname) override {return false;} virtual int RenameFile(const std::string &from, const std::string &to) override {return -1;} virtual bool RemoveFile(const std::string &filename) override {return false;} - virtual bool GetHostPath(const std::string &inpath, Path &outpath) override {return false;} virtual int Ioctl(u32 handle, u32 cmd, u32 indataPtr, u32 inlen, u32 outdataPtr, u32 outlen, int &usec) override {return SCE_KERNEL_ERROR_ERRNO_FUNCTION_NOT_SUPPORTED; } virtual PSPDevType DevType(u32 handle) override { return PSPDevType::INVALID; } virtual FileSystemFlags Flags() override { return FileSystemFlags::NONE; } diff --git a/Core/FileSystems/ISOFileSystem.h b/Core/FileSystems/ISOFileSystem.h index b1fa9648e1..1941cc998c 100644 --- a/Core/FileSystems/ISOFileSystem.h +++ b/Core/FileSystems/ISOFileSystem.h @@ -48,7 +48,6 @@ public: size_t WriteFile(u32 handle, const u8 *pointer, s64 size) override; size_t WriteFile(u32 handle, const u8 *pointer, s64 size, int &usec) override; - bool GetHostPath(const std::string &inpath, Path &outpath) override {return false;} bool MkDir(const std::string &dirname) override {return false;} bool RmDir(const std::string &dirname) override { return false; } int RenameFile(const std::string &from, const std::string &to) override { return -1; } @@ -146,7 +145,6 @@ public: size_t WriteFile(u32 handle, const u8 *pointer, s64 size, int &usec) override { return isoFileSystem_->WriteFile(handle, pointer, size, usec); } - bool GetHostPath(const std::string &inpath, Path &outpath) override { return false; } bool MkDir(const std::string &dirname) override { return false; } bool RmDir(const std::string &dirname) override { return false; } int RenameFile(const std::string &from, const std::string &to) override { return -1; } diff --git a/Core/FileSystems/MetaFileSystem.cpp b/Core/FileSystems/MetaFileSystem.cpp index 0658c2df92..58ed10f31e 100644 --- a/Core/FileSystems/MetaFileSystem.cpp +++ b/Core/FileSystems/MetaFileSystem.cpp @@ -377,19 +377,6 @@ PSPFileInfo MetaFileSystem::GetFileInfo(std::string filename) } } -bool MetaFileSystem::GetHostPath(const std::string &inpath, Path &outpath) -{ - std::lock_guard guard(lock); - std::string of; - IFileSystem *system; - int error = MapFilePath(inpath, of, &system); - if (error == 0) { - return system->GetHostPath(of, outpath); - } else { - return false; - } -} - std::vector MetaFileSystem::GetDirListing(std::string path) { std::lock_guard guard(lock); diff --git a/Core/FileSystems/MetaFileSystem.h b/Core/FileSystems/MetaFileSystem.h index f16e01fdf9..a1152e1abd 100644 --- a/Core/FileSystems/MetaFileSystem.h +++ b/Core/FileSystems/MetaFileSystem.h @@ -93,9 +93,6 @@ public: std::string NormalizePrefix(std::string prefix) const; - // Only possible if a file system is a DirectoryFileSystem or similar. - bool GetHostPath(const std::string &inpath, Path &outpath) override; - std::vector GetDirListing(std::string path) override; int OpenFile(std::string filename, FileAccess access, const char *devicename = nullptr) override; void CloseFile(u32 handle) override; @@ -106,8 +103,7 @@ public: size_t SeekFile(u32 handle, s32 position, FileMove type) override; PSPFileInfo GetFileInfo(std::string filename) override; bool OwnsHandle(u32 handle) override { return false; } - inline size_t GetSeekPos(u32 handle) - { + inline size_t GetSeekPos(u32 handle) { return SeekFile(handle, 0, FILEMOVE_CURRENT); } diff --git a/Core/FileSystems/VirtualDiscFileSystem.cpp b/Core/FileSystems/VirtualDiscFileSystem.cpp index 99c2180421..02032b481f 100644 --- a/Core/FileSystems/VirtualDiscFileSystem.cpp +++ b/Core/FileSystems/VirtualDiscFileSystem.cpp @@ -646,12 +646,6 @@ PSPFileInfo VirtualDiscFileSystem::GetFileInfo(std::string filename) { return x; } -bool VirtualDiscFileSystem::GetHostPath(const std::string &inpath, Path &outpath) -{ - ERROR_LOG(FILESYS,"VirtualDiscFileSystem: Retrieving host path"); - return false; -} - #ifdef _WIN32 #define FILETIME_FROM_UNIX_EPOCH_US 11644473600000000ULL diff --git a/Core/FileSystems/VirtualDiscFileSystem.h b/Core/FileSystems/VirtualDiscFileSystem.h index 927700fe2a..bd8604ae3d 100644 --- a/Core/FileSystems/VirtualDiscFileSystem.h +++ b/Core/FileSystems/VirtualDiscFileSystem.h @@ -40,7 +40,6 @@ public: bool OwnsHandle(u32 handle) override; int Ioctl(u32 handle, u32 cmd, u32 indataPtr, u32 inlen, u32 outdataPtr, u32 outlen, int &usec) override; PSPDevType DevType(u32 handle) override; - bool GetHostPath(const std::string &inpath, Path &outpath) override; std::vector GetDirListing(std::string path) override; FileSystemFlags Flags() override { return FileSystemFlags::UMD; } u64 FreeSpace(const std::string &path) override { return 0; }