file.read(bytes)
Posted: Wed Dec 03, 2014 12:57 pm
... would be nice to have, ideally working together with file.seek() and auto-advancing the pointer on every read. Would return requested number of bytes or fewer(at the last read)
Use cases could be:
Thomas
P.S.: BTW, many thanks for the latest firmware updates!
Use cases could be:
Code: Select all
file.open("test.jpg","r")
chunk=file.read(50)
while chunk
sk:send(chunk)
chunk=file.read(50)
end
Code: Select all
file.open("some.file","rw")
file.seek("set",10)
chunk=file.read(20)
file.seek("set",10)
file.write(analyze_and_modify(chunk))
Thomas
P.S.: BTW, many thanks for the latest firmware updates!