docs: update resources API docs
This commit is contained in:
@@ -4,6 +4,8 @@
|
||||
|
||||
**类型**: `class`
|
||||
|
||||
**头文件**: `XCEngine/Resources/FileSystem.h`
|
||||
|
||||
**描述**: 资源文件系统,负责资源文件的查找、读取和虚拟文件系统(支持目录和归档包)管理。
|
||||
|
||||
## 概述
|
||||
@@ -46,16 +48,16 @@
|
||||
|
||||
| 方法 | 描述 |
|
||||
|------|------|
|
||||
| `void Initialize(const Containers::String& rootPath)` | 初始化,设置资源根目录 |
|
||||
| `void Shutdown()` | 关闭,释放所有归档 |
|
||||
| `bool AddArchive(const Containers::String& archivePath)` | 添加归档包(优先查找) |
|
||||
| `bool AddDirectory(const Containers::String& directoryPath)` | 添加资源目录 |
|
||||
| `void RemoveArchive(const Containers::String& archivePath)` | 移除归档包 |
|
||||
| `bool FindResource(const Containers::String& relativePath, Containers::String& outAbsolutePath) const` | 查找资源的绝对路径 |
|
||||
| `bool Exists(const Containers::String& relativePath) const` | 检查资源是否存在 |
|
||||
| `Containers::Array<Core::uint8> ReadResource(const Containers::String& relativePath) const` | 读取资源文件内容(字节数组) |
|
||||
| `bool GetResourceInfo(const Containers::String& relativePath, ResourceInfo& outInfo) const` | 获取资源信息(部分字段可能未填充) |
|
||||
| `void EnumerateResources(const Containers::String& pattern, Containers::Array<ResourceInfo>& outResources) const` | 枚举匹配的资源(当前为 stub,仅清空输出) |
|
||||
| `Initialize()` | 初始化,设置资源根目录 |
|
||||
| `Shutdown()` | 关闭,释放所有归档 |
|
||||
| [`AddArchive`](addarchive.md) | 添加归档包(优先查找) |
|
||||
| [`AddDirectory`](adddirectory.md) | 添加资源目录 |
|
||||
| [`RemoveArchive`](removearchive.md) | 移除归档包 |
|
||||
| [`FindResource`](findresource.md) | 查找资源的绝对路径 |
|
||||
| [`Exists`](exists.md) | 检查资源是否存在 |
|
||||
| [`ReadResource`](readresource.md) | 读取资源文件内容(字节数组) |
|
||||
| [`GetResourceInfo`](getresourceinfo.md) | 获取资源信息 |
|
||||
| [`EnumerateResources`](enumerateresources.md) | 枚举匹配的资源 |
|
||||
|
||||
## 实现说明
|
||||
|
||||
|
||||
Reference in New Issue
Block a user