Operating system for OpenComputers
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

25 lignes
570B

  1. local tA = {...}
  2. if #tA < 1 then
  3. local mt = fs.mounts()
  4. for k,v in pairs(mt) do
  5. print(tostring(fs.address(v)).." on "..tostring(v).." type "..fs.type(v))
  6. end
  7. else
  8. local addr,path = tA[1],tA[2]
  9. local fscomp = component.list("filesystem")
  10. if not fscomp[addr] then
  11. for k,v in pairs(fscomp) do
  12. if k:find(addr) then
  13. print(tostring(addr).." not found, assuming you meant "..k)
  14. addr = k
  15. break
  16. end
  17. end
  18. end
  19. local proxy = component.proxy(addr)
  20. if not proxy then
  21. return false, "no such filesystem component"
  22. end
  23. print(fs.mount(path,proxy))
  24. end