函数:cloud_file_rename 云盘文件(夹)重命名

函数名称:云盘文件(夹)重命名

函数功能:修改云盘文件(夹)名称

函数方法

ret = ts_enterprise_lib:cloud_file_list(file,rename)

参数 类型 必填 说明
file string 修改前的文件(夹)路径
rename string 修改后的文件(夹)名称
返回值 类型 说明
ret table 成功 - true,失败 - false

函数用例

local ts = require("ts")
local json = ts.json
-- 企业版库为企业版专用库请勿在除企业版外的产品使用,此库已内置,无需下载
--如果提示没有 ts_enterprise_lib 库请重启企业版客户端服务再试
ts_enterprise_lib = require("ts_enterprise_lib")
--修改 a1 文件夹下 1.txt 文件名称为 2.txt
dialog(json.encode({ts_enterprise_lib:cloud_file_rename("/a1/1.txt","2")}),5)
--修改 a1 文件夹下的 1 文件夹名称为 2
dialog(json.encode({ts_enterprise_lib:cloud_file_rename("/a1/1/","2")}),5)

注意事项

  • 错误返回 timeout 请在获取数据前增加代码 ts_enterprise_lib.timeout = 20 或者增加参数: timeout_seconds 的时间,如果仍返回 timeout 请修改为 20 以上的数字
Copyright 北京帮你玩科技有限公司 2023 all right reserved,powered by Gitbook该文章修订时间: 2024-03-06 17:50:18

results matching ""

    No results matching ""