Remove unused function GetHostPath from filesystems

This commit is contained in:
Henrik Rydgård 2021-05-11 10:34:52 +02:00
parent 9c66f81cbc
commit 40ab92fe7b
10 changed files with 1 additions and 49 deletions

View file

@ -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;
}

View file

@ -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:

View file

@ -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<PSPFileInfo> VFSFileSystem::GetDirListing(std::string path) {
std::vector<PSPFileInfo> myVector;
// TODO

View file

@ -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; }

View file

@ -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; }

View file

@ -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; }

View file

@ -377,19 +377,6 @@ PSPFileInfo MetaFileSystem::GetFileInfo(std::string filename)
}
}
bool MetaFileSystem::GetHostPath(const std::string &inpath, Path &outpath)
{
std::lock_guard<std::recursive_mutex> 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<PSPFileInfo> MetaFileSystem::GetDirListing(std::string path)
{
std::lock_guard<std::recursive_mutex> guard(lock);

View file

@ -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<PSPFileInfo> 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);
}

View file

@ -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

View file

@ -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<PSPFileInfo> GetDirListing(std::string path) override;
FileSystemFlags Flags() override { return FileSystemFlags::UMD; }
u64 FreeSpace(const std::string &path) override { return 0; }