The last two days I'm trying write binary data to SPIFFS, but I face a few questions and problems.
1 - is there no "wb" mode to write binary files to SPIFFS?
2 - Why using POSIX style causes exception to?
I tried this snipest code below:
FILE *ptr;
byte bb[1];
bb[0] = 0xD8;
ptr = fopen("/teste.bin", "wb");
fwrite(bb, 1, 1, ptr);
fclose(ptr);
And with SPIFFS method, I could write file, but the mode FILE_WRITE doesn't writes them as binary data.
Some tip, please?