13 lines
334 B
Text
13 lines
334 B
Text
|
function findManual(name)
|
||
|
local flist = fs.list("/etc/manuals")
|
||
|
for _, file in ipairs(flist) do
|
||
|
if not fs.isDir("/etc/manuals/"..file) and file == name then
|
||
|
local handle = fs.open("/etc/manuals/"..file, "r")
|
||
|
local contents = handle.readAll()
|
||
|
handle.close()
|
||
|
return contents
|
||
|
end
|
||
|
end
|
||
|
return "No manual available"
|
||
|
end
|