函数:cloud_file_del 云盘删除文件(夹)

函数名称:云盘删除文件(夹)

函数功能:在云盘中删除指定文件(夹)

函数方法

ret = ts_enterprise_lib:cloud_file_del(file)

参数 类型 必填 说明
file string 需要删除的文件(夹)路径,如果是文件,需要包含文件名称
返回值 类型 说明
ret table 成功 - true,失败 - false

函数用例

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

注意事项

  • 错误返回 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 ""