diff options
author | bunnei <bunneidev@gmail.com> | 2018-09-25 22:59:44 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-25 22:59:44 +0200 |
commit | 7b81e1e52565ee867c285e2b0c2526f8d4b82581 (patch) | |
tree | 718decad5aae4153d8acaa444058914a1c12f147 /src/core/file_sys/vfs_real.cpp | |
parent | Merge pull request #1393 from tech4me/svc (diff) | |
parent | fsmitm: Cleanup and modernize fsmitm port (diff) | |
download | yuzu-7b81e1e52565ee867c285e2b0c2526f8d4b82581.tar yuzu-7b81e1e52565ee867c285e2b0c2526f8d4b82581.tar.gz yuzu-7b81e1e52565ee867c285e2b0c2526f8d4b82581.tar.bz2 yuzu-7b81e1e52565ee867c285e2b0c2526f8d4b82581.tar.lz yuzu-7b81e1e52565ee867c285e2b0c2526f8d4b82581.tar.xz yuzu-7b81e1e52565ee867c285e2b0c2526f8d4b82581.tar.zst yuzu-7b81e1e52565ee867c285e2b0c2526f8d4b82581.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/file_sys/vfs_real.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/core/file_sys/vfs_real.cpp b/src/core/file_sys/vfs_real.cpp index 5e242e20f..9defad04c 100644 --- a/src/core/file_sys/vfs_real.cpp +++ b/src/core/file_sys/vfs_real.cpp @@ -413,6 +413,23 @@ std::string RealVfsDirectory::GetFullPath() const { return out; } +std::map<std::string, VfsEntryType, std::less<>> RealVfsDirectory::GetEntries() const { + if (perms == Mode::Append) + return {}; + + std::map<std::string, VfsEntryType, std::less<>> out; + FileUtil::ForeachDirectoryEntry( + nullptr, path, + [&out](u64* entries_out, const std::string& directory, const std::string& filename) { + const std::string full_path = directory + DIR_SEP + filename; + out.emplace(filename, FileUtil::IsDirectory(full_path) ? VfsEntryType::Directory + : VfsEntryType::File); + return true; + }); + + return out; +} + bool RealVfsDirectory::ReplaceFileWithSubdirectory(VirtualFile file, VirtualDir dir) { return false; } |