Advertisement
pedrosgali

PedrOS emptyTemp

Nov 22nd, 2013
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.55 KB | None | 0 0
  1. os.loadAPI("OS/API/draw")
  2. os.loadAPI("OS/API/tableStuff")
  3. os.loadAPI("OS/API/file")
  4.  
  5. click = draw.optionBox("Confirm delete:", "Are you sure you want to delete the folder?", "Ok", "Cancel")
  6.  
  7. for i = 1, 2 do
  8.     shell.run("cd ..")
  9. end
  10.  
  11. if click == "button1" then
  12.     tempTable = tableStuff.newNameTable("OS/temp/")
  13.     for i = 1, 100 do
  14.         if tempTable[i] == "emptyTemp" then
  15.         elseif tempTable[i] == nil then
  16.         else
  17.             shell.run("delete OS/temp/"..tempTable[i])
  18.         end
  19.     end
  20. else
  21. end
  22. file.updateMenu(temp)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement