Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local blacklist = {"rom"}
- local list = fs.list(shell.dir())
- local function isblacklisted(sPath)
- for _, sblacklistedPath in ipairs(blacklist) do
- if sblacklistedPath == sPath then
- return true
- end
- end
- return false
- end
- for n, obj in pairs(list) do
- if not isblacklisted(obj) then
- if obj ~= shell.getRunningProgram() then
- fs.delete(obj)
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement