Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- name = ...
- if not(name) then
- term.setTextColor(colors.yellow)
- print("Usage: locate <filename>")
- return
- end
- local function search(dir)
- for k, v in pairs(fs.list(dir)) do
- if (dir..v):find(name) then
- print(dir..v)
- end
- if fs.isDir(dir..v) then
- search(dir..v.."/")
- end
- end
- end
- search("/")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement