- Fix link resolution with proper relative/absolute path handling - Improve link styling with underline decoration - Hide leaf nodes from tree, only show directories - Fix log file path for packaged app
621 B
621 B
ResourceFileSystem::ReadResource
Containers::Array<Core::uint8> ReadResource(const Containers::String& relativePath) const
读取资源文件内容。优先从归档包中读取,其次从目录中查找。
参数:
relativePath- 资源相对路径
返回: 文件内容的字节数组,读取失败返回空数组
复杂度: O(n),n 为文件大小
示例:
auto data = ResourceFileSystem::Get().ReadResource("textures/player.png");
if (!data.Empty()) {
// 使用数据...
}
相关文档
- ResourceFileSystem 总览 - 返回类总览