This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
MentalHamburger's profile picture

Restricting to certain programs

Started by MentalHamburger, 16 February 2016 - 09:34 AM
MentalHamburger #1
Posted 16 February 2016 - 10:34 AM
Hello, im trying to restrict the fs.delete function so that it can only be used in specific programs.


local oldfsdelete = fs.delete
function fs.delete()
  --verify permision then if the program has permission run oldfsdelete
end

ive looked into using shell.getRunningProgram but i think that would just return the program directory of the above code.

any help is appriciated :)/>
Edited on 16 February 2016 - 09:35 AM
KingofGamesYami #2
Posted 16 February 2016 - 02:21 PM
It would not. It would return the file path of the program running at the time it is called.