Compare commits
No commits in common. "77ceb65be66fea46d1ab41dc7edde28cd5d92477" and "63cb1ceea4bd8242366420bab97871263ef06c9d" have entirely different histories.
77ceb65be6
...
63cb1ceea4
@ -29,8 +29,19 @@ for k,v in pairs({"makeDirectory","exists","isDirectory","list","lastModified","
|
|||||||
end
|
end
|
||||||
|
|
||||||
local function fread(self,length)
|
local function fread(self,length)
|
||||||
|
length = length or "*l"
|
||||||
if length == "*a" then
|
if length == "*a" then
|
||||||
length = math.huge
|
length = math.huge
|
||||||
|
elseif length == "*l" then
|
||||||
|
local rstr, lstr = "", ""
|
||||||
|
while true do
|
||||||
|
lstr = fs.mounts[self.fs].read(self.fid,1)
|
||||||
|
if lstr == "\n" or not lstr then
|
||||||
|
break
|
||||||
|
end
|
||||||
|
rstr = rstr .. lstr
|
||||||
|
end
|
||||||
|
return rstr
|
||||||
end
|
end
|
||||||
if type(length) == "number" then
|
if type(length) == "number" then
|
||||||
local rstr, lstr = "", ""
|
local rstr, lstr = "", ""
|
||||||
|
@ -1,8 +0,0 @@
|
|||||||
local counter = 0
|
|
||||||
for addr in component.list("tape_drive") do
|
|
||||||
iofs.register("tape"..tonumber(counter),function()
|
|
||||||
local tape = component.proxy(addr)
|
|
||||||
return tape.read, tape.write, function() end, tape.seek
|
|
||||||
end)
|
|
||||||
counter = counter + 1
|
|
||||||
end
|
|
Loading…
Reference in New Issue
Block a user