Skip to main content
2 of 10
added 3 characters in body
Michel Keijzers
  • 13k
  • 7
  • 43
  • 59

How can write a single data into spiffs?

typedef struct book {
char title[20];
 char author[20];
 int pages[10];

} Book;

Book b1 = {"The Zahir","Paulo Coelho",336,0};

while writing this structure into SPIFFS of ESP8266, I am using function

filename.write( (const uint8_t*)&b1, sizeof(b1));

but how can write a single data like name of book into structure of spiffs?