14 StreamOffsetFromCurrent,
15 StreamOffsetFromStart,
20 StreamDirectionForward,
21 StreamDirectionBackward,
24typedef bool (*StreamWriteCB)(
Stream* stream,
const void* context);
30void stream_free(
Stream* stream);
36void stream_clean(
Stream* stream);
44bool stream_eof(
Stream* stream);
54bool stream_seek(
Stream* stream, int32_t offset, StreamOffset offset_type);
64bool stream_seek_to_char(
Stream* stream,
char c, StreamDirection direction);
71size_t stream_tell(
Stream* stream);
78size_t stream_size(
Stream* stream);
87size_t stream_write(
Stream* stream,
const uint8_t* data,
size_t size);
96size_t stream_read(
Stream* stream, uint8_t* data,
size_t count);
107bool stream_delete_and_insert(
110 StreamWriteCB write_callback,
111 const void* context);
128bool stream_rewind(
Stream* stream);
136size_t stream_write_char(
Stream* stream,
char c);
152size_t stream_write_cstring(
Stream* stream,
const char*
string);
161size_t stream_write_format(
Stream* stream,
const char* format, ...)
162 _ATTRIBUTE((__format__(__printf__, 2, 3)));
171size_t stream_write_vaformat(
Stream* stream, const
char* format, va_list args);
182bool stream_insert(
Stream* stream, const uint8_t* data,
size_t size);
191bool stream_insert_char(
Stream* stream,
char c);
209bool stream_insert_cstring(
Stream* stream, const
char*
string);
219bool stream_insert_format(
Stream* stream, const
char* format, ...)
220 _ATTRIBUTE((__format__(__printf__, 2, 3)));
230bool stream_insert_vaformat(
Stream* stream, const
char* format, va_list args);
240bool stream_delete_and_insert_char(
Stream* stream,
size_t delete_size,
char c);
250bool stream_delete_and_insert_string(
Stream* stream,
size_t delete_size,
FuriString*
string);
260bool stream_delete_and_insert_cstring(
Stream* stream,
size_t delete_size, const
char*
string);
271bool stream_delete_and_insert_format(
Stream* stream,
size_t delete_size, const
char* format, ...)
272 _ATTRIBUTE((__format__(__printf__, 3, 4)));
283bool stream_delete_and_insert_vaformat(
297bool stream_delete(
Stream* stream,
size_t size);
306size_t stream_copy(
Stream* stream_from,
Stream* stream_to,
size_t size);
314size_t stream_copy_full(
Stream* stream_from,
Stream* stream_to);
333size_t stream_load_from_file(
Stream* stream,
Storage* storage, const
char* path);
343size_t stream_save_to_file(
Stream* stream,
Storage* storage, const
char* path, FS_OpenMode mode);
349void stream_dump_data(
Stream* stream);
APIs for working with storages, directories and files.
Definition storage_i.h:23