# 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) - 获取路径