working on api docs

This commit is contained in:
Astronand committed 2026-11-26 21:06:36 -05:00
1 parent 56d8fb2016
commit 38d56ced19
43 files changed
+5669 -618

No files matched your search

@@ -258,7 +258,7 @@ internal["root"] = createDisk("root", "/root", false, {
end,
getLabel = function()
local h = fs.open("/.rootlabel", "r")
if not h then return "$" end
if not h then return "root" end
local label = h.readAll()
h.close()
return label
@@ -266,14 +266,23 @@ internal["root"] = createDisk("root", "/root", false, {
})
local function refresh()
local exclude = {root=true,rom=true,["$"]=true}
disks={}
for _, disk in ipairs({peripheral.find("drive")}) do
if disk.isDiskPresent() then
disks[tostring(disk.getDiskID())]=createDisk("cctdisk"..tostring(disk.getDiskID()), disk.getMountPath(), false, fs)
for i,v in ipairs(fs.list("/")) do
if fs.isDir("/"..v) and not exclude[v] then
local uid=""
local h=fs.open("/"..v.."/.fsid", "r")
if not h then
uid=string.format("%X",math.random(0,2^32))
local h2=fs.open("/"..v.."/.fsid", "w")
h2.write(uid)
h2.close()
else uid=h.readAll(); h.close() end
disks[uid]=createDisk(uid,"/"..v,false,{})
end
end
end
local function iter()
refresh()
local combined = {}