We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Originally File.size() returns an unsigned long value, but the file size is larger than 32768, it will return an incorrect value.
#include <FileIO.h> #include <Bridge.h> void setup() { Bridge.begin(); Serial.begin(9600); FileSystem.begin(); while(!Serial); File dataFile = FileSystem.open("/bin/busybox", FILE_READ); unsigned long len= dataFile.size(); Serial.println(len);//return 26544 }
PuTTY root@Arduino:/bin# ls busybox -l -rwxr-xr-x 1 root root 419760 Apr 10 09:11 busybox
The text was updated successfully, but these errors were encountered:
Fixed wrong return value in FileIO::size()
8131af9
Fixes #2203
Thank you for the bug report.
The function is fixed here: 8131af9 and will be released with IDE 1.5.8
C
Sorry, something went wrong.
No branches or pull requests
Originally File.size() returns an unsigned long value, but the file size is larger than 32768, it will return an incorrect value.
PuTTY
root@Arduino:/bin# ls busybox -l
-rwxr-xr-x 1 root root 419760 Apr 10 09:11 busybox
The text was updated successfully, but these errors were encountered: