v1.6.0 - Removed low level libraries computer and component. They must now be imported.

This commit is contained in:
TheWahlolly
2025-05-23 15:34:50 +03:00
parent 5552657dbd
commit 91d9ebecb1
16 changed files with 75 additions and 40 deletions
+3 -10
View File
@@ -1,10 +1,12 @@
local loadfile = ... -- raw loadfile from boot.lua
local component
local component, computer
if loadfile then
component = loadfile("/halyde/lib/component.lua")(loadfile)
computer = _G.computer
elseif import then
component = import("component")
computer = import("computer")
end
local filesystem = {}
@@ -127,15 +129,6 @@ function filesystem.size(path)
return component.invoke(address, "size", absPath)
end
function filesystem.isDirectory(path)
checkArg(1, path, "string")
local address, absPath = filesystem.absolutePath(path)
if not address then
return false
end
return component.invoke(address, "isDirectory", absPath)
end
function filesystem.rename(fromPath, toPath)
checkArg(1, fromPath, "string")
checkArg(2, toPath, "string")