Closed
Description
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
Metadata
Metadata
Assignees
Labels
No labels