| 97 | } |
| 98 | |
| 99 | static dmResourceProvider::Result ReadFile(dmResourceProvider::HArchiveInternal _archive, dmhash_t path_hash, const char* path, uint8_t* buffer, uint32_t buffer_len) |
| 100 | { |
| 101 | FileProviderContext* archive = (FileProviderContext*)_archive; |
| 102 | (void)path_hash; |
| 103 | |
| 104 | char path_buffer[DMPATH_MAX_PATH]; |
| 105 | const char* resolved_path = ResolveFilePath(&archive->m_BaseUri, path, path_buffer, sizeof(path_buffer)); |
| 106 | if (!resolved_path) { |
| 107 | return dmResourceProvider::RESULT_NOT_FOUND; |
| 108 | } |
| 109 | |
| 110 | uint32_t file_size; |
| 111 | dmSys::Result r = dmSys::LoadResource(resolved_path, buffer, buffer_len, &file_size); |
| 112 | return SysResultToProviderResult(r); |
| 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 | { |
nothing calls this directly
no test coverage detected