Flipper Zero Firmware
Loading...
Searching...
No Matches
filesystem_api_defines.h
1#pragma once
2#include <stdint.h>
3#include <stdbool.h>
4
5#ifdef __cplusplus
6extern "C" {
7#endif
8
10typedef enum {
11 FSAM_READ = (1 << 0),
12 FSAM_WRITE = (1 << 1),
13 FSAM_READ_WRITE = FSAM_READ | FSAM_WRITE,
14} FS_AccessMode;
15
17typedef enum {
18 FSOM_OPEN_EXISTING = 1,
19 FSOM_OPEN_ALWAYS = 2,
20 FSOM_OPEN_APPEND = 4,
21 FSOM_CREATE_NEW = 8,
22 FSOM_CREATE_ALWAYS = 16,
23} FS_OpenMode;
24
26typedef enum {
27 FSE_OK,
28 FSE_NOT_READY,
29 FSE_EXIST,
30 FSE_NOT_EXIST,
31 FSE_INVALID_PARAMETER,
32 FSE_DENIED,
33 FSE_INVALID_NAME,
34 FSE_INTERNAL,
35 FSE_NOT_IMPLEMENTED,
36 FSE_ALREADY_OPEN,
37} FS_Error;
38
40typedef enum {
41 FSF_DIRECTORY = (1 << 0),
42} FS_Flags;
43
45typedef struct File File;
46
48typedef struct {
49 uint8_t flags;
50 uint64_t size;
51} FileInfo;
52
57const char* filesystem_api_error_get_desc(FS_Error error_id);
58
63bool file_info_is_dir(const FileInfo* file_info);
64
65#ifdef __cplusplus
66}
67#endif
Structure that hold file index and returned api errors.
Definition filesystem_api_internal.h:17
Structure that hold file info.
Definition filesystem_api_defines.h:48
uint8_t flags
flags from FS_Flags enum
Definition filesystem_api_defines.h:49
uint64_t size
file size
Definition filesystem_api_defines.h:50