docs: update resources API docs
This commit is contained in:
34
docs/api/resources/filearchive/open.md
Normal file
34
docs/api/resources/filearchive/open.md
Normal file
@@ -0,0 +1,34 @@
|
||||
# FileArchive::Open
|
||||
|
||||
打开归档目录。
|
||||
|
||||
## 方法签名
|
||||
|
||||
```cpp
|
||||
bool Open(const Containers::String& path) override;
|
||||
```
|
||||
|
||||
## 详细描述
|
||||
|
||||
打开指定路径的目录作为归档。归档路径可以是绝对路径或相对路径。方法会设置内部路径并标记归档为有效状态。
|
||||
|
||||
## 参数
|
||||
|
||||
| 参数 | 类型 | 描述 |
|
||||
|------|------|------|
|
||||
| `path` | `const Containers::String&` | 归档目录路径 |
|
||||
|
||||
## 返回值
|
||||
|
||||
| 类型 | 描述 |
|
||||
|------|------|
|
||||
| `bool` | 始终返回 `true`。当前实现不验证路径是否真实存在。 |
|
||||
|
||||
## 示例
|
||||
|
||||
```cpp
|
||||
FileArchive archive;
|
||||
if (archive.Open("resources/textures/")) {
|
||||
// 归档已打开
|
||||
}
|
||||
```
|
||||
Reference in New Issue
Block a user