v1.6.0 - Removed low level libraries computer and component. They must now be imported.
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user