summaryrefslogtreecommitdiffstats
path: root/src/core/file_sys/partition_filesystem.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/file_sys/partition_filesystem.cpp')
-rw-r--r--src/core/file_sys/partition_filesystem.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/core/file_sys/partition_filesystem.cpp b/src/core/file_sys/partition_filesystem.cpp
index a5259a593..846986736 100644
--- a/src/core/file_sys/partition_filesystem.cpp
+++ b/src/core/file_sys/partition_filesystem.cpp
@@ -65,6 +65,9 @@ PartitionFilesystem::PartitionFilesystem(std::shared_ptr<VfsFile> file) {
std::string name(
reinterpret_cast<const char*>(&file_data[strtab_offset + entry.strtab_offset]));
+ offsets.insert_or_assign(name, content_offset + entry.offset);
+ sizes.insert_or_assign(name, entry.size);
+
pfs_files.emplace_back(std::make_shared<OffsetVfsFile>(
file, entry.size, content_offset + entry.offset, std::move(name)));
}
@@ -78,6 +81,14 @@ Loader::ResultStatus PartitionFilesystem::GetStatus() const {
return status;
}
+std::map<std::string, u64> PartitionFilesystem::GetFileOffsets() const {
+ return offsets;
+}
+
+std::map<std::string, u64> PartitionFilesystem::GetFileSizes() const {
+ return sizes;
+}
+
std::vector<std::shared_ptr<VfsFile>> PartitionFilesystem::GetFiles() const {
return pfs_files;
}