Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local PF = "OS/" -- full path of file. make this file startup file
- local old_fsOpen = _G["fs"]["open"]
- _G["fs"]["open"] = function (path, mode)
- mode = string.lower (mode)
- -- copy below 3 lines to add new files.
- if shell.resolveProgram (path) == shell.resolveProgram (PF..".lock") and (mode == "w" or mode == "wb") then
- return nil
- end
- if shell.resolveProgram (path) == shell.resolveProgram (PF..".oslock") and (mode == "w" or mode == "wb") then
- return nil
- end
- if shell.resolveProgram (path) == shell.resolveProgram (PF..".computer") and (mode == "w" or mode == "wb") then
- return nil
- end
- if shell.resolveProgram (path) == shell.resolveProgram (PF.."run") and (mode == "w" or mode == "wb") then
- return nil
- end
- if shell.resolveProgram (path) == shell.resolveProgram (PF.."createfile") and (mode == "w" or mode == "wb") then
- return nil
- end
- if shell.resolveProgram (path) == shell.resolveProgram (PF.."notepad") and (mode == "w" or mode == "wb") then
- return nil
- end
- if shell.resolveProgram (path) == shell.resolveProgram (PF..".search") and (mode == "w" or mode == "wb") then
- return nil
- end
- if shell.resolveProgram (path) == shell.resolveProgram (PF.."noteread") and (mode == "w" or mode == "wb") then
- return nil
- end
- if shell.resolveProgram (path) == shell.resolveProgram (PF..".password") and (mode == "w" or mode == "wb") then
- return nil
- end
- if shell.resolveProgram (path) == shell.resolveProgram (PF..".osprotect") and (mode == "w" or mode == "wb") then
- return nil
- end
- if shell.resolveProgram (path) == shell.resolveProgram (PF.."editor") and (mode == "w" or mode == "wb") then
- return nil
- end
- if shell.resolveProgram (path) == shell.resolveProgram ("startup") and (mode == "w" or mode == "wb") then
- return nil
- end
- return old_fsOpen (path, mode)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement