diff options
author | Zach Hilman <zachhilman@gmail.com> | 2018-09-20 03:54:14 +0200 |
---|---|---|
committer | Zach Hilman <zachhilman@gmail.com> | 2018-09-22 01:53:05 +0200 |
commit | d6cbb3a3e0d89508e53accac1c2b823dae5e8cc2 (patch) | |
tree | a3a84cdbe3dead1399c8c6d4bdf5c2c394be5b73 /src/core/file_sys/vfs_real.cpp | |
parent | common_paths: Add Load and Dump dirs (diff) | |
download | yuzu-d6cbb3a3e0d89508e53accac1c2b823dae5e8cc2.tar yuzu-d6cbb3a3e0d89508e53accac1c2b823dae5e8cc2.tar.gz yuzu-d6cbb3a3e0d89508e53accac1c2b823dae5e8cc2.tar.bz2 yuzu-d6cbb3a3e0d89508e53accac1c2b823dae5e8cc2.tar.lz yuzu-d6cbb3a3e0d89508e53accac1c2b823dae5e8cc2.tar.xz yuzu-d6cbb3a3e0d89508e53accac1c2b823dae5e8cc2.tar.zst yuzu-d6cbb3a3e0d89508e53accac1c2b823dae5e8cc2.zip |
Diffstat (limited to 'src/core/file_sys/vfs_real.cpp')
-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..a58a02de7 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> RealVfsDirectory::GetEntries() const { + if (perms == Mode::Append) + return {}; + + std::map<std::string, VfsEntryType> 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; } |