diff options
| author | 2013-09-23 21:55:02 -0400 | |
|---|---|---|
| committer | 2013-09-23 21:55:02 -0400 | |
| commit | 59020e8d9c63dc3086da8fdf0513282eb218d523 (patch) | |
| tree | 3626d1ca932dbbbf62fc7e73627e20101d65e99d /src | |
| parent | added PPSSPP's file system directory module for game loading (diff) | |
| download | yuzu-59020e8d9c63dc3086da8fdf0513282eb218d523.tar.gz yuzu-59020e8d9c63dc3086da8fdf0513282eb218d523.tar.xz yuzu-59020e8d9c63dc3086da8fdf0513282eb218d523.zip | |
renamed PSPFileInfo to just FileInfo
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/src/file_sys/file_sys.h | 14 | ||||
| -rw-r--r-- | src/core/src/file_sys/file_sys_directory.cpp | 20 | ||||
| -rw-r--r-- | src/core/src/file_sys/file_sys_directory.h | 8 |
3 files changed, 21 insertions, 21 deletions
diff --git a/src/core/src/file_sys/file_sys.h b/src/core/src/file_sys/file_sys.h index 8611d743f..b27e36c80 100644 --- a/src/core/src/file_sys/file_sys.h +++ b/src/core/src/file_sys/file_sys.h | |||
| @@ -56,12 +56,12 @@ private: | |||
| 56 | int handle_; | 56 | int handle_; |
| 57 | }; | 57 | }; |
| 58 | 58 | ||
| 59 | struct PSPFileInfo { | 59 | struct FileInfo { |
| 60 | PSPFileInfo() | 60 | FileInfo() |
| 61 | : size(0), access(0), exists(false), type(FILETYPE_NORMAL), isOnSectorSystem(false), startSector(0), numSectors(0) {} | 61 | : size(0), access(0), exists(false), type(FILETYPE_NORMAL), isOnSectorSystem(false), startSector(0), numSectors(0) {} |
| 62 | 62 | ||
| 63 | void DoState(PointerWrap &p) { | 63 | void DoState(PointerWrap &p) { |
| 64 | auto s = p.Section("PSPFileInfo", 1); | 64 | auto s = p.Section("FileInfo", 1); |
| 65 | if (!s) | 65 | if (!s) |
| 66 | return; | 66 | return; |
| 67 | 67 | ||
| @@ -101,13 +101,13 @@ public: | |||
| 101 | virtual ~IFileSystem() {} | 101 | virtual ~IFileSystem() {} |
| 102 | 102 | ||
| 103 | virtual void DoState(PointerWrap &p) = 0; | 103 | virtual void DoState(PointerWrap &p) = 0; |
| 104 | virtual std::vector<PSPFileInfo> GetDirListing(std::string path) = 0; | 104 | virtual std::vector<FileInfo> GetDirListing(std::string path) = 0; |
| 105 | virtual u32 OpenFile(std::string filename, FileAccess access, const char *devicename=NULL) = 0; | 105 | virtual u32 OpenFile(std::string filename, FileAccess access, const char *devicename=NULL) = 0; |
| 106 | virtual void CloseFile(u32 handle) = 0; | 106 | virtual void CloseFile(u32 handle) = 0; |
| 107 | virtual size_t ReadFile(u32 handle, u8 *pointer, s64 size) = 0; | 107 | virtual size_t ReadFile(u32 handle, u8 *pointer, s64 size) = 0; |
| 108 | virtual size_t WriteFile(u32 handle, const u8 *pointer, s64 size) = 0; | 108 | virtual size_t WriteFile(u32 handle, const u8 *pointer, s64 size) = 0; |
| 109 | virtual size_t SeekFile(u32 handle, s32 position, FileMove type) = 0; | 109 | virtual size_t SeekFile(u32 handle, s32 position, FileMove type) = 0; |
| 110 | virtual PSPFileInfo GetFileInfo(std::string filename) = 0; | 110 | virtual FileInfo GetFileInfo(std::string filename) = 0; |
| 111 | virtual bool OwnsHandle(u32 handle) = 0; | 111 | virtual bool OwnsHandle(u32 handle) = 0; |
| 112 | virtual bool MkDir(const std::string &dirname) = 0; | 112 | virtual bool MkDir(const std::string &dirname) = 0; |
| 113 | virtual bool RmDir(const std::string &dirname) = 0; | 113 | virtual bool RmDir(const std::string &dirname) = 0; |
| @@ -120,13 +120,13 @@ public: | |||
| 120 | class EmptyFileSystem : public IFileSystem { | 120 | class EmptyFileSystem : public IFileSystem { |
| 121 | public: | 121 | public: |
| 122 | virtual void DoState(PointerWrap &p) {} | 122 | virtual void DoState(PointerWrap &p) {} |
| 123 | std::vector<PSPFileInfo> GetDirListing(std::string path) {std::vector<PSPFileInfo> vec; return vec;} | 123 | std::vector<FileInfo> GetDirListing(std::string path) {std::vector<FileInfo> vec; return vec;} |
| 124 | u32 OpenFile(std::string filename, FileAccess access, const char *devicename=NULL) {return 0;} | 124 | u32 OpenFile(std::string filename, FileAccess access, const char *devicename=NULL) {return 0;} |
| 125 | void CloseFile(u32 handle) {} | 125 | void CloseFile(u32 handle) {} |
| 126 | size_t ReadFile(u32 handle, u8 *pointer, s64 size) {return 0;} | 126 | size_t ReadFile(u32 handle, u8 *pointer, s64 size) {return 0;} |
| 127 | size_t WriteFile(u32 handle, const u8 *pointer, s64 size) {return 0;} | 127 | size_t WriteFile(u32 handle, const u8 *pointer, s64 size) {return 0;} |
| 128 | size_t SeekFile(u32 handle, s32 position, FileMove type) {return 0;} | 128 | size_t SeekFile(u32 handle, s32 position, FileMove type) {return 0;} |
| 129 | PSPFileInfo GetFileInfo(std::string filename) {PSPFileInfo f; return f;} | 129 | FileInfo GetFileInfo(std::string filename) {FileInfo f; return f;} |
| 130 | bool OwnsHandle(u32 handle) {return false;} | 130 | bool OwnsHandle(u32 handle) {return false;} |
| 131 | virtual bool MkDir(const std::string &dirname) {return false;} | 131 | virtual bool MkDir(const std::string &dirname) {return false;} |
| 132 | virtual bool RmDir(const std::string &dirname) {return false;} | 132 | virtual bool RmDir(const std::string &dirname) {return false;} |
diff --git a/src/core/src/file_sys/file_sys_directory.cpp b/src/core/src/file_sys/file_sys_directory.cpp index cf21d74cb..e4ae47677 100644 --- a/src/core/src/file_sys/file_sys_directory.cpp +++ b/src/core/src/file_sys/file_sys_directory.cpp | |||
| @@ -526,8 +526,8 @@ size_t DirectoryFileSystem::SeekFile(u32 handle, s32 position, FileMove type) { | |||
| 526 | } | 526 | } |
| 527 | } | 527 | } |
| 528 | 528 | ||
| 529 | PSPFileInfo DirectoryFileSystem::GetFileInfo(std::string filename) { | 529 | FileInfo DirectoryFileSystem::GetFileInfo(std::string filename) { |
| 530 | PSPFileInfo x; | 530 | FileInfo x; |
| 531 | x.name = filename; | 531 | x.name = filename; |
| 532 | 532 | ||
| 533 | std::string fullName = GetLocalPath(filename); | 533 | std::string fullName = GetLocalPath(filename); |
| @@ -584,8 +584,8 @@ static void tmFromFiletime(tm &dest, FILETIME &src) | |||
| 584 | } | 584 | } |
| 585 | #endif | 585 | #endif |
| 586 | 586 | ||
| 587 | std::vector<PSPFileInfo> DirectoryFileSystem::GetDirListing(std::string path) { | 587 | std::vector<FileInfo> DirectoryFileSystem::GetDirListing(std::string path) { |
| 588 | std::vector<PSPFileInfo> myVector; | 588 | std::vector<FileInfo> myVector; |
| 589 | #ifdef _WIN32 | 589 | #ifdef _WIN32 |
| 590 | WIN32_FIND_DATA findData; | 590 | WIN32_FIND_DATA findData; |
| 591 | HANDLE hFind; | 591 | HANDLE hFind; |
| @@ -599,7 +599,7 @@ std::vector<PSPFileInfo> DirectoryFileSystem::GetDirListing(std::string path) { | |||
| 599 | } | 599 | } |
| 600 | 600 | ||
| 601 | while (true) { | 601 | while (true) { |
| 602 | PSPFileInfo entry; | 602 | FileInfo entry; |
| 603 | if (findData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) | 603 | if (findData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) |
| 604 | entry.type = FILETYPE_DIRECTORY; | 604 | entry.type = FILETYPE_DIRECTORY; |
| 605 | else | 605 | else |
| @@ -642,7 +642,7 @@ std::vector<PSPFileInfo> DirectoryFileSystem::GetDirListing(std::string path) { | |||
| 642 | } | 642 | } |
| 643 | 643 | ||
| 644 | while ((dirp = readdir(dp)) != NULL) { | 644 | while ((dirp = readdir(dp)) != NULL) { |
| 645 | PSPFileInfo entry; | 645 | FileInfo entry; |
| 646 | struct stat s; | 646 | struct stat s; |
| 647 | std::string fullName = GetLocalPath(path) + "/"+dirp->d_name; | 647 | std::string fullName = GetLocalPath(path) + "/"+dirp->d_name; |
| 648 | stat(fullName.c_str(), &s); | 648 | stat(fullName.c_str(), &s); |
| @@ -734,8 +734,8 @@ u32 VFSFileSystem::OpenFile(std::string filename, FileAccess access, const char | |||
| 734 | return newHandle; | 734 | return newHandle; |
| 735 | } | 735 | } |
| 736 | 736 | ||
| 737 | PSPFileInfo VFSFileSystem::GetFileInfo(std::string filename) { | 737 | FileInfo VFSFileSystem::GetFileInfo(std::string filename) { |
| 738 | PSPFileInfo x; | 738 | FileInfo x; |
| 739 | x.name = filename; | 739 | x.name = filename; |
| 740 | 740 | ||
| 741 | std::string fullName = GetLocalPath(filename); | 741 | std::string fullName = GetLocalPath(filename); |
| @@ -809,8 +809,8 @@ bool VFSFileSystem::GetHostPath(const std::string &inpath, std::string &outpath) | |||
| 809 | return false; | 809 | return false; |
| 810 | } | 810 | } |
| 811 | 811 | ||
| 812 | std::vector<PSPFileInfo> VFSFileSystem::GetDirListing(std::string path) { | 812 | std::vector<FileInfo> VFSFileSystem::GetDirListing(std::string path) { |
| 813 | std::vector<PSPFileInfo> myVector; | 813 | std::vector<FileInfo> myVector; |
| 814 | // TODO | 814 | // TODO |
| 815 | return myVector; | 815 | return myVector; |
| 816 | } | 816 | } |
diff --git a/src/core/src/file_sys/file_sys_directory.h b/src/core/src/file_sys/file_sys_directory.h index 5591cd7d9..a11331a27 100644 --- a/src/core/src/file_sys/file_sys_directory.h +++ b/src/core/src/file_sys/file_sys_directory.h | |||
| @@ -88,13 +88,13 @@ public: | |||
| 88 | ~DirectoryFileSystem(); | 88 | ~DirectoryFileSystem(); |
| 89 | 89 | ||
| 90 | void DoState(PointerWrap &p); | 90 | void DoState(PointerWrap &p); |
| 91 | std::vector<PSPFileInfo> GetDirListing(std::string path); | 91 | std::vector<FileInfo> GetDirListing(std::string path); |
| 92 | u32 OpenFile(std::string filename, FileAccess access, const char *devicename=NULL); | 92 | u32 OpenFile(std::string filename, FileAccess access, const char *devicename=NULL); |
| 93 | void CloseFile(u32 handle); | 93 | void CloseFile(u32 handle); |
| 94 | size_t ReadFile(u32 handle, u8 *pointer, s64 size); | 94 | size_t ReadFile(u32 handle, u8 *pointer, s64 size); |
| 95 | size_t WriteFile(u32 handle, const u8 *pointer, s64 size); | 95 | size_t WriteFile(u32 handle, const u8 *pointer, s64 size); |
| 96 | size_t SeekFile(u32 handle, s32 position, FileMove type); | 96 | size_t SeekFile(u32 handle, s32 position, FileMove type); |
| 97 | PSPFileInfo GetFileInfo(std::string filename); | 97 | FileInfo GetFileInfo(std::string filename); |
| 98 | bool OwnsHandle(u32 handle); | 98 | bool OwnsHandle(u32 handle); |
| 99 | 99 | ||
| 100 | bool MkDir(const std::string &dirname); | 100 | bool MkDir(const std::string &dirname); |
| @@ -125,13 +125,13 @@ public: | |||
| 125 | ~VFSFileSystem(); | 125 | ~VFSFileSystem(); |
| 126 | 126 | ||
| 127 | void DoState(PointerWrap &p); | 127 | void DoState(PointerWrap &p); |
| 128 | std::vector<PSPFileInfo> GetDirListing(std::string path); | 128 | std::vector<FileInfo> GetDirListing(std::string path); |
| 129 | u32 OpenFile(std::string filename, FileAccess access, const char *devicename=NULL); | 129 | u32 OpenFile(std::string filename, FileAccess access, const char *devicename=NULL); |
| 130 | void CloseFile(u32 handle); | 130 | void CloseFile(u32 handle); |
| 131 | size_t ReadFile(u32 handle, u8 *pointer, s64 size); | 131 | size_t ReadFile(u32 handle, u8 *pointer, s64 size); |
| 132 | size_t WriteFile(u32 handle, const u8 *pointer, s64 size); | 132 | size_t WriteFile(u32 handle, const u8 *pointer, s64 size); |
| 133 | size_t SeekFile(u32 handle, s32 position, FileMove type); | 133 | size_t SeekFile(u32 handle, s32 position, FileMove type); |
| 134 | PSPFileInfo GetFileInfo(std::string filename); | 134 | FileInfo GetFileInfo(std::string filename); |
| 135 | bool OwnsHandle(u32 handle); | 135 | bool OwnsHandle(u32 handle); |
| 136 | 136 | ||
| 137 | bool MkDir(const std::string &dirname); | 137 | bool MkDir(const std::string &dirname); |