local fileCutil = CTNFileUtil();

local sSourcePath = [[E:/test_class_2/]];
local sPath = [[E:/test_class_3/]];

-- 判断是否存在目录
if fileCutil:directoryExists(sSourcePath) == false then
    -- 不存在创建目录
    fileCutil:createDirectory(sPath);
    ui:tip('success');
end

local sPath = [[E:/test_class/test_class_3]];
-- 创建目录
if  fileCutil:createDirectory(sPath) == true then
    ui:tip('success');
end


local sSourcePath = [[E:/test_class/test_class_3]];
local sDestPath = [[E:/test_class/test_class_4]]
-- 复制目录
if  fileCutil:copyDirectory(sSourcePath, sDestPath) == true then
    ui:tip('success');
end


local sPath = [[E:/test_class/test_class_4]];
-- 删除目录(只能删除目录下没有文件的目录)
if fileCutil:removeDirectory(sPath) == true then
    ui:tip('success');
end


local sSourcePath = [[E:/test_class/test_class_3_11111]];
local sDestPath = [[E:/test_class/test_class_4]]
-- 复制目录
if fileCutil:copyDirectories(sSourcePath, sDestPath) == true then
    ui:tip('success');
end



local sPath = [[E:/test_class/test_class_4]];
-- 删除目录(只能删除目录下没有文件的目录)
if fileCutil:removeDirectories(sPath) == true then
    ui:tip('success');
end
Copyright © TouchNet 2015 all right reserved,powered by Gitbook最后修订时间: 2022-06-21 09:21:04

results matching ""

    No results matching ""