unzip 解压

--解压 zip 文件
function unzip(path,to)
    os.execute("unzip "..path.." -d "..to);
end

参数说明

参数 类型 说明
path string 为待解压文件的路径
to string 要解压到的文件夹路径,默认不覆盖

函数用例

如要解压名为 1.zip 的文件,则输入:

--解压zip文件
function unzip(path,to)
    os.execute("unzip "..path.." -d "..to);
end
unzip(userPath().."/lua/1.zip",userPath().."/lua/");
Copyright 北京帮你玩科技有限公司 2023 all right reserved,powered by Gitbook该文章修订时间: 2024-03-06 17:50:18

results matching ""

    No results matching ""