As the title says... Chat on...

User avatar
By joe
#10014 It appears from perusing app/modules/file.c and a few tests that you are limited to having only one open file at a time. Does anybody know if this is a limitation of the underlying SPIFFS code or simply a limitation of the Lua support for the file system?

Thanks.

Joe
User avatar
By pellepl
#11175 Possible number of concurrent open files is defined in

s32_t SPIFFS_mount(spiffs *fs, spiffs_config *config, u8_t *work,
u8_t *fd_space, u32_t fd_space_size,
void *cache, u32_t cache_size,
spiffs_check_callback check_cb_f);

or more specific the u8_t *fd_space, u32_t fd_space_size parameters.

The size of a file descriptor is target dependent, but normally is around 32 bytes. The more ram you give, the more filedescriptors you'll have.

Cheers / Peter