Loading...
Searching...
No Matches
dir_walk.h
1#pragma once
2#include <storage/storage.h>
3
4#ifdef __cplusplus
5extern "C" {
6#endif
7
8typedef struct DirWalk DirWalk;
9
10typedef enum {
11 DirWalkOK,
12 DirWalkError,
13 DirWalkLast,
14} DirWalkResult;
15
16typedef bool (*DirWalkFilterCb)(const char* name, FileInfo* fileinfo, void* ctx);
17
23DirWalk* dir_walk_alloc(Storage* storage);
24
29void dir_walk_free(DirWalk* dir_walk);
30
36void dir_walk_set_recursive(DirWalk* dir_walk, bool recursive);
37
44void dir_walk_set_filter_cb(DirWalk* dir_walk, DirWalkFilterCb cb, void* context);
45
53bool dir_walk_open(DirWalk* dir_walk, const char* path);
54
60FS_Error dir_walk_get_error(DirWalk* dir_walk);
61
69DirWalkResult dir_walk_read(DirWalk* dir_walk, FuriString* return_path, FileInfo* fileinfo);
70
75void dir_walk_close(DirWalk* dir_walk);
76
77#ifdef __cplusplus
78}
79#endif
APIs for working with storages, directories and files.
Definition dir_walk.c:6
Structure that hold file info.
Definition filesystem_api_defines.h:48
Definition string.c:4
Definition storage_i.h:23