Save and access files in SPIFFS file system

#1

Please let me know if anyone know how to save and access any data file in spiffs file system of esp8266 programmatically .I want to save data in file present in spiffs FS . Data is coming on UART of esp8266. Please let me know how much bigger file size save in spiffs FS of ESP8266. I read lot of article on google that says it can not more then 512 KB size.
Also please let me know if any other way to hold data for some time.

Thanks
Abhishek Goel

#2

The default filesystem sizes are: 128KB for 1MB and 2MB of flash, 256KB for >=4MB of flash.
It is possible to create an extra partition for a device with >=4MB of flash.
It is also possible to add an external SPI flash device.

The maximum file size depends of the FS size and the sizes of the files already existing.

#3

can you provide me any example in which create and access files present in file system.

#4

C library’s file operations are available.

#5

is it use with mongoose os

#6

How this functions use for esp , can I use this in c source file which is present in src folder of mongoose
setup.I am using mongoose os for developing firmware of esp8266. please let me know.

#7

Sure, it’s plain C.

Examples