表盘 APIhmFS 文件系统模块rename版本:v3On this pagehmFS.rename(oldPath, newPath)重命名文件 类型 (oldPath: string, newPath: string) => result 参数 参数说明必填类型默认值oldPath旧文件路径是string-newPath新文件路径是string- result 说明类型操作结果,0 表示成功number 代码示例 const result = hmFS.rename('path/to/old_file.txt', 'path/to/new_file.txt')console.log(result)