Files
XCEngine/docs/api/resources/resourcepath/setpath.md

30 lines
522 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# ResourcePath::SetPath
```cpp
void SetPath(const Containers::String& path)
```
设置路径字符串。
**详细描述:**
更新内部存储的路径字符串。
**参数:**
- `path` - 新的路径字符串
**复杂度:** O(n)n 为路径长度
**示例:**
```cpp
ResourcePath path;
path.SetPath("textures/player.png");
Containers::String name = path.GetFileName(); // "player.png"
```
## 相关文档
- [ResourcePath 总览](resourcepath.md) - 返回类总览
- [GetPath](getpath.md) - 获取路径