| 68 | } |
| 69 | |
| 70 | std::string PFS0::GetFile(const u32 idx) { |
| 71 | if(IsInvalidFileIndex(idx) || (idx >= this->files.size())) { |
| 72 | return ""; |
| 73 | } |
| 74 | else { |
| 75 | return this->files[idx].name; |
| 76 | } |
| 77 | } |
| 78 | |
| 79 | u64 PFS0::ReadFromFile(const u32 idx, const u64 offset, const u64 size, void *read_buf) { |
| 80 | return this->exp->ReadFile(this->path, (this->header_size + this->files[idx].entry.offset + offset), size, read_buf); |