IOS系統LUA列舉目錄下的文件夾、並遍歷搜索特徵文件夾

    --ios7
    local tempPath=txt_path.."path7.txt";
    os.execute(string.format("ls /var/mobile/Applications/ > %s",tempPath));
    local tempArray = ReadLines(tempPath);
    for i=1,#tempArray,1 do
        local temoArea = ReadLines("/var/mobile/Applications/"..tempArray[i].."/Library/Preferences/com.siamgame.en.qjmu.plist")
        if #temoArea > 0 then
            fileWrite(txt_path,"path7.txt",tempArray[i],"w")
        end
    end
    --ios8
    local tempPath=txt_path.."path8.txt";
    os.execute(string.format("ls /var/mobile/Containers/Data/Application/ > %s",tempPath));
    local tempArray = ReadLines(tempPath);
    for i=1,#tempArray,1 do
        local temoArea = ReadLines("/var/mobile/Containers/Data/Application/"..tempArray[i].."/Library/Preferences/com.siamgame.en.qjmu.plist")
        if #temoArea > 0 then
            fileWrite(txt_path,"path8.txt",tempArray[i],"w")
        end
    end

LS命令是重點

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章