added a shutil function to list components

This commit is contained in:
Izaya 2017-06-26 12:49:25 +00:00
parent a1b0507479
commit df6d6257f9

View File

@ -10,3 +10,10 @@ end
function mem() function mem()
return "Total:\t"..tostring(computer.totalMemory()/1024).."K\nFree:\t"..tostring(computer.freeMemory()/1024).."K\nUsed:\t"..tostring((computer.totalMemory()-computer.freeMemory())/1024).."K" return "Total:\t"..tostring(computer.totalMemory()/1024).."K\nFree:\t"..tostring(computer.freeMemory()/1024).."K\nUsed:\t"..tostring((computer.totalMemory()-computer.freeMemory())/1024).."K"
end end
function components()
s=""
for t,a in component.list() do
s=s..TS(t).."\t"..TS(a).."\n"
end
return s
end