LittleFS: add overrides for Stream::send by d-a-v · Pull Request #8386 · esp8266/Arduino (original) (raw)

fixes #8384

::availableForWrite() could unconditionnally return a full sector as free space like proposed in #8384.

This proposal aims at returning a non-0 size fitting the current file block.
If the block is full and the filesystem is not full, it returns a full-FS-block size.
This way, the API allows users to take proper actions without losing data from the input stream when the filesystem is full, even if there is generally little to do in such case.