Compare commits

..

No commits in common. "77ceb65be66fea46d1ab41dc7edde28cd5d92477" and "63cb1ceea4bd8242366420bab97871263ef06c9d" have entirely different histories.

2 changed files with 11 additions and 8 deletions

View File

@ -29,8 +29,19 @@ for k,v in pairs({"makeDirectory","exists","isDirectory","list","lastModified","
end
local function fread(self,length)
length = length or "*l"
if length == "*a" then
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
if type(length) == "number" then
local rstr, lstr = "", ""

View File

@ -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