| 113 | } |
| 114 | |
| 115 | static dmResourceProvider::Result ReadFilePartial(dmResourceProvider::HArchiveInternal _archive, dmhash_t path_hash, const char* path, uint32_t offset, uint32_t size, uint8_t* buffer, uint32_t* nread) |
| 116 | { |
| 117 | FileProviderContext* archive = (FileProviderContext*)_archive; |
| 118 | (void)path_hash; |
| 119 | |
| 120 | char path_buffer[DMPATH_MAX_PATH]; |
| 121 | const char* resolved_path = ResolveFilePath(&archive->m_BaseUri, path, path_buffer, sizeof(path_buffer)); |
| 122 | if (!resolved_path) { |
| 123 | return dmResourceProvider::RESULT_NOT_FOUND; |
| 124 | } |
| 125 | |
| 126 | dmSys::Result r = dmSys::LoadResourcePartial(resolved_path, offset, size, buffer, nread); |
| 127 | return SysResultToProviderResult(r); |
| 128 | } |
| 129 | |
| 130 | static void SetupArchiveLoader(dmResourceProvider::ArchiveLoader* loader) |
| 131 | { |
nothing calls this directly
no test coverage detected