cannot read file over 1024
Posted: Fri Jan 22, 2016 3:49 pm
I tried to read a file of about 1400 bytes but file.read() returns only leading 1024 bytes.
Just the following code prints 1024 while the file "sample.txt" is 1400 bytes.
Is this known limitation or bug?
The version I use is:
Thank you.
Just the following code prints 1024 while the file "sample.txt" is 1400 bytes.
Code: Select all
file.open("sample.txt","r")
res = file.read()
print(string.length(res))
file.close()
Is this known limitation or bug?
The version I use is:
Code: Select all
NodeMCU custom build by frightanic.com
branch: master
commit: c8037568571edb5c568c2f8231e4f8ce0683b883
SSL: false
modules: node,file,gpio,wifi,net,pwm,tmr,adc,uart,bit,mqtt,coap,cjson,crypto,rc,dht,rtcmem,rtctime,rtcfifo,sntp,enduser_setup
build built on: 2016-01-08 10:39
powered by Lua 5.1.4 on SDK 1.4.0
Thank you.