[FL-3055] Getter for application data path (#2181)

* Threads: application id
* Unit tests: appsdata getter test
* Unit tests: moar test cases for appsdata getter
* Unit tests: remove folders after test
* Storage: dir_is_exist, migrate, + unit_tests
* Plugins: migration
* Storage: common_exists, moar unit_tests 4 "common_migrate", "common_migrate" and "common_merge" bugfixes
* Storage: use FuriString for path handling
* Storage API: send caller thread id with path
* Storage: remove StorageType field in storage file list
* Storage: simplify processing
* Storage API: send caller thread id with path everywhere
* Storage: /app alias, unit tests and path creation
* Storage, path helper: remove unused
* Examples: app data example
* App plugins: use new VFS path
* Storage: file_info_is_dir
* Services: handle alias if the service accepts a path.
* App plugins: fixes
* Make PVS happy
* Storage: fix storage_merge_recursive
* Storage: rename process_aliases to resolve_path. Rename APPS_DATA to APP_DATA.
* Apps: use predefined macro instead of raw paths. Example Apps Data: README fixes.
* Storage: rename storage_common_resolve_path to storage_common_resolve_path_and_ensure_app_directory
* Api: fix version
* Storage: rename alias message
* Storage: do not create app folders in path resolving process in certain cases.

---------

Co-authored-by: Astra <93453568+Astrrra@users.noreply.github.com>
Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
This commit is contained in:
Sergey Gavrilov
2023-03-01 20:57:27 +03:00
committed by GitHub
parent 9ae58f5462
commit 777a4d109d
52 changed files with 871 additions and 577 deletions

View File

@@ -1,5 +1,5 @@
entry,status,name,type,params
Version,+,15.0,,
Version,+,15.1,,
Header,+,applications/services/bt/bt_service/bt.h,,
Header,+,applications/services/cli/cli.h,,
Header,+,applications/services/cli/cli_vcp.h,,
@@ -847,6 +847,7 @@ Function,+,file_browser_worker_set_folder_callback,void,"BrowserWorker*, Browser
Function,+,file_browser_worker_set_item_callback,void,"BrowserWorker*, BrowserWorkerListItemCallback"
Function,+,file_browser_worker_set_list_callback,void,"BrowserWorker*, BrowserWorkerListLoadCallback"
Function,+,file_browser_worker_set_long_load_callback,void,"BrowserWorker*, BrowserWorkerLongLoadCallback"
Function,+,file_info_is_dir,_Bool,const FileInfo*
Function,+,file_stream_alloc,Stream*,Storage*
Function,+,file_stream_close,_Bool,Stream*
Function,+,file_stream_get_error,FS_Error,Stream*
@@ -1521,6 +1522,7 @@ Function,+,furi_thread_flags_get,uint32_t,
Function,+,furi_thread_flags_set,uint32_t,"FuriThreadId, uint32_t"
Function,+,furi_thread_flags_wait,uint32_t,"uint32_t, uint32_t, uint32_t"
Function,+,furi_thread_free,void,FuriThread*
Function,+,furi_thread_get_appid,const char*,FuriThreadId
Function,+,furi_thread_get_current,FuriThread*,
Function,+,furi_thread_get_current_id,FuriThreadId,
Function,+,furi_thread_get_current_priority,FuriThreadPriority,
@@ -1535,6 +1537,7 @@ Function,+,furi_thread_is_suspended,_Bool,FuriThreadId
Function,+,furi_thread_join,_Bool,FuriThread*
Function,+,furi_thread_mark_as_service,void,FuriThread*
Function,+,furi_thread_resume,void,FuriThreadId
Function,+,furi_thread_set_appid,void,"FuriThread*, const char*"
Function,+,furi_thread_set_callback,void,"FuriThread*, FuriThreadCallback"
Function,+,furi_thread_set_context,void,"FuriThread*, void*"
Function,+,furi_thread_set_current_priority,void,FuriThreadPriority
@@ -2430,14 +2433,18 @@ Function,-,srand48,void,long
Function,-,srandom,void,unsigned
Function,+,sscanf,int,"const char*, const char*, ..."
Function,+,storage_common_copy,FS_Error,"Storage*, const char*, const char*"
Function,+,storage_common_exists,_Bool,"Storage*, const char*"
Function,+,storage_common_fs_info,FS_Error,"Storage*, const char*, uint64_t*, uint64_t*"
Function,+,storage_common_merge,FS_Error,"Storage*, const char*, const char*"
Function,+,storage_common_migrate,FS_Error,"Storage*, const char*, const char*"
Function,+,storage_common_mkdir,FS_Error,"Storage*, const char*"
Function,+,storage_common_remove,FS_Error,"Storage*, const char*"
Function,+,storage_common_rename,FS_Error,"Storage*, const char*, const char*"
Function,+,storage_common_resolve_path_and_ensure_app_directory,void,"Storage*, FuriString*"
Function,+,storage_common_stat,FS_Error,"Storage*, const char*, FileInfo*"
Function,+,storage_common_timestamp,FS_Error,"Storage*, const char*, uint32_t*"
Function,+,storage_dir_close,_Bool,File*
Function,+,storage_dir_exists,_Bool,"Storage*, const char*"
Function,+,storage_dir_open,_Bool,"File*, const char*"
Function,+,storage_dir_read,_Bool,"File*, FileInfo*, char*, uint16_t"
Function,-,storage_dir_rewind,_Bool,File*
1 entry status name type params
2 Version + 15.0 15.1
3 Header + applications/services/bt/bt_service/bt.h
4 Header + applications/services/cli/cli.h
5 Header + applications/services/cli/cli_vcp.h
847 Function + file_browser_worker_set_item_callback void BrowserWorker*, BrowserWorkerListItemCallback
848 Function + file_browser_worker_set_list_callback void BrowserWorker*, BrowserWorkerListLoadCallback
849 Function + file_browser_worker_set_long_load_callback void BrowserWorker*, BrowserWorkerLongLoadCallback
850 Function + file_info_is_dir _Bool const FileInfo*
851 Function + file_stream_alloc Stream* Storage*
852 Function + file_stream_close _Bool Stream*
853 Function + file_stream_get_error FS_Error Stream*
1522 Function + furi_thread_flags_set uint32_t FuriThreadId, uint32_t
1523 Function + furi_thread_flags_wait uint32_t uint32_t, uint32_t, uint32_t
1524 Function + furi_thread_free void FuriThread*
1525 Function + furi_thread_get_appid const char* FuriThreadId
1526 Function + furi_thread_get_current FuriThread*
1527 Function + furi_thread_get_current_id FuriThreadId
1528 Function + furi_thread_get_current_priority FuriThreadPriority
1537 Function + furi_thread_join _Bool FuriThread*
1538 Function + furi_thread_mark_as_service void FuriThread*
1539 Function + furi_thread_resume void FuriThreadId
1540 Function + furi_thread_set_appid void FuriThread*, const char*
1541 Function + furi_thread_set_callback void FuriThread*, FuriThreadCallback
1542 Function + furi_thread_set_context void FuriThread*, void*
1543 Function + furi_thread_set_current_priority void FuriThreadPriority
2433 Function - srandom void unsigned
2434 Function + sscanf int const char*, const char*, ...
2435 Function + storage_common_copy FS_Error Storage*, const char*, const char*
2436 Function + storage_common_exists _Bool Storage*, const char*
2437 Function + storage_common_fs_info FS_Error Storage*, const char*, uint64_t*, uint64_t*
2438 Function + storage_common_merge FS_Error Storage*, const char*, const char*
2439 Function + storage_common_migrate FS_Error Storage*, const char*, const char*
2440 Function + storage_common_mkdir FS_Error Storage*, const char*
2441 Function + storage_common_remove FS_Error Storage*, const char*
2442 Function + storage_common_rename FS_Error Storage*, const char*, const char*
2443 Function + storage_common_resolve_path_and_ensure_app_directory void Storage*, FuriString*
2444 Function + storage_common_stat FS_Error Storage*, const char*, FileInfo*
2445 Function + storage_common_timestamp FS_Error Storage*, const char*, uint32_t*
2446 Function + storage_dir_close _Bool File*
2447 Function + storage_dir_exists _Bool Storage*, const char*
2448 Function + storage_dir_open _Bool File*, const char*
2449 Function + storage_dir_read _Bool File*, FileInfo*, char*, uint16_t
2450 Function - storage_dir_rewind _Bool File*