[FL-2693] RW buffered streams (#1523)

* Add write methods for stream cache
* Fix logical error
* Implement write cache for buffered file streams
* Minor code refactoring
* Less ugly code
* Better read() implementation
* Intermediate implementation
* Fix logical error
* Code cleanup
* Update FFF comments
* Fix logical error
* Github: rsync with delete

Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
Georgii Surkov
2022-08-03 19:43:14 +03:00
committed by GitHub
parent 6499597586
commit 135fbd294b
6 changed files with 156 additions and 35 deletions

View File

@@ -116,7 +116,7 @@ FlipperFormat* flipper_format_string_alloc();
FlipperFormat* flipper_format_file_alloc(Storage* storage);
/**
* Allocate FlipperFormat as file, buffered read-only mode.
* Allocate FlipperFormat as file, buffered mode.
* @return FlipperFormat* pointer to a FlipperFormat instance
*/
FlipperFormat* flipper_format_buffered_file_alloc(Storage* storage);
@@ -131,7 +131,7 @@ FlipperFormat* flipper_format_buffered_file_alloc(Storage* storage);
bool flipper_format_file_open_existing(FlipperFormat* flipper_format, const char* path);
/**
* Open existing file, read-only with buffered read operations.
* Open existing file, buffered mode.
* Use only if FlipperFormat allocated as a file.
* @param flipper_format Pointer to a FlipperFormat instance
* @param path File path