[FL-2415] Storage: blocking file open (#1078)
* Storage: correct replacement for "/any" path in path holder * Unit tests: storage, blocking file open test * File stream: error getter * Storage: common copy and common remove now executes in external thread * Filesystems: got rid of unused functions * Storage: untangle dependencies, ram-frendly filesystem api * iButton: context assertions * Storage: pubsub messages * Storage: wait for the file to close if it was open * Storage: fix folder copying * Storage: unit test * Storage: pubsub documentation * Fix merge error * Fix memleak in storage test * Storage: remove unused define Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
		| @@ -61,6 +61,13 @@ bool file_stream_close(Stream* _stream) { | ||||
|     return storage_file_close(stream->file); | ||||
| } | ||||
|  | ||||
| FS_Error file_stream_get_error(Stream* _stream) { | ||||
|     furi_assert(_stream); | ||||
|     FileStream* stream = (FileStream*)_stream; | ||||
|     furi_check(stream->stream_base.vtable == &file_stream_vtable); | ||||
|     return storage_file_get_error(stream->file); | ||||
| } | ||||
|  | ||||
| static void file_stream_free(FileStream* stream) { | ||||
|     storage_file_free(stream->file); | ||||
|     free(stream); | ||||
|   | ||||
| @@ -35,6 +35,13 @@ bool file_stream_open( | ||||
|  */ | ||||
| bool file_stream_close(Stream* stream); | ||||
|  | ||||
| /**  | ||||
|  * Retrieves the error id from the file object | ||||
|  * @param stream pointer to stream object. | ||||
|  * @return FS_Error error id | ||||
|  */ | ||||
| FS_Error file_stream_get_error(Stream* stream); | ||||
|  | ||||
| #ifdef __cplusplus | ||||
| } | ||||
| #endif | ||||
		Reference in New Issue
	
	Block a user