local fileCutil = CTNFileUtil();
local sNewFilePath = [[E:/test_class/2.txt]];
if fileCutil:fileExists(sNewFilePath) == true then
print('success');
else
if fileCutil:createFile(sNewFilePath) == true then
print('文件不存在,创建成功');
end;
end
local sSourceFile = [[E:/test_class/1.txt]];
local sDestFile = [[E:/test_class_2/2.txt]];
if fileCutil:copyFile(sSourceFile, sDestFile) == false then
print('未复制成功');
end
local sSourceFile = [[E:/test_class/1.txt]];
local sPath = [[E:/test_class_2]];
local sDestFile = [[3.txt]];
if fileCutil:copyFileReName(sSourceFile, sPath, sDestFile) == true then
print('复制成功');
end
local sPath = [[E:/test_class_2/3.txt]]
if fileCutil:removeFile(sPath) == true then
ui:tip('删除成功');
end
local sSourceFile = [[E:/test_class/1.txt]];
local sDestFile = [[E:/test_class/1_rename.txt]];
if fileCutil:renameFile(sSourceFile, sDestFile) == true then
ui:tip('重命名成功');
end
local sSourceFile = [[E:/test_class/1_copy.txt]];
local sDestFile = [[E:/test_class_2/1_copy.txt]];
if fileCutil:moveFile(sSourceFile, sDestFile) == true then
ui:tip('移动成功');
end
local sSourceFile = [[E:/test_class/]];
local sDestFile = [[E:/test_class_2/]];
if fileCutil:copyFiles(sSourceFile, sDestFile) == true then
ui:tip('success');
end