LolzPB

touch

May 21st, 2020
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. args = {...}
  2.  
  3. if #args < 1 then
  4. print("Uso: touch <directory>")
  5. return
  6. end
  7.  
  8. if fs.exists(shell.resolve(args[1])) then
  9. print("Il file esiste gia'")
  10. return
  11. end
  12.  
  13. file = fs.open(shell.resolve(args[1]), "w")
  14. file.write("")
  15. file.close()
Add Comment
Please, Sign In to add comment