mirror of
https://git.shadowkat.net/izaya/OC-PsychOS2.git
synced 2024-11-25 12:42:10 -05:00
never mind no reading files line by line in fs.read
This commit is contained in:
parent
63cb1ceea4
commit
8e3ee7bcb2
@ -29,19 +29,8 @@ 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 = "", ""
|
||||
|
Loading…
Reference in New Issue
Block a user