函数: config.open 打开数据存储文件(仅支持 iOS)

函数分类:ts.so

函数名称:打开数据存储文件

函数功能:创建并初始化数据流

函数方法

config.open(path);

参数 类型 必填 说明
path string 创建并初始化的文件路径

函数用例

require "TSLib"
local ts = require("ts")
file=userPath().."/res/1123.plist"
ts.config.open(file)
--必要函数,参数为 true,操作结束后必须以此函数结尾,
ts.config.close(true)
local bool,kind = isFileExist(file)
if bool then
    if kind then
        dialog("文件存在")
    end
else
    dialog("文件不存在")
end

注意事项

  • 在结尾要加 ts.config.close 函数否则将无法创建文件。
Copyright 北京帮你玩科技有限公司 2023 all right reserved,powered by Gitbook该文章修订时间: 2024-03-06 17:50:18

results matching ""

    No results matching ""