local a={...}local b=a[1]a=nil;local a=import("filesystem")local c=import("unicode")local d=0;local e=2;local f={}local g={}if b then if b:sub(1,1)~="/"then b=a.concat(shell.workingDirectory,b)end else b=shell.workingDirectory end;local h=a.list(b)if h then for a,a in pairs(h)do if a:sub(-1,-1)=="/"then table.insert(f,a)a=a:sub(1,-2)else table.insert(g,a)end;if c.wlen(a)>d then d=c.wlen(a)end end;table.sort(f)table.sort(g)h={}for a,a in ipairs(f)do table.insert(h,a)end;for a,a in ipairs(g)do table.insert(h,a)end;f,g=nil,nil;for f,f in ipairs(h)do local g=false;local h;if f:sub(-1,-1)=="/"then g=true;h="\27[93m"..f:sub(1,-2)elseif f:find(".")and f:match("[^.]+$")=="lua"then h="\27[92m"..f end;h=(h or f)..string.rep(" ",d-c.wlen(f)+e)if g then print(h.." \27[0m[DIR]")else local a=a.size(a.concat(b,f))local b;if convert(a,"B","GiB")>=1 then b=tostring(math.floor(convert(a,"B","GiB")*100+0.5)/100).." GiB"elseif convert(a,"B","MiB")>=1 then b=tostring(math.floor(convert(a,"B","MiB")*100+0.5)/100).." MiB"elseif convert(a,"B","KiB")>=1 then b=tostring(math.floor(convert(a,"B","KiB")*100+0.5)/100).." KiB"else b=tostring(a).." B"end;print(h.."\27[0m"..b)end end end