29 #ifndef BD_FILESYSTEM_H_
30 #define BD_FILESYSTEM_H_
54 void (*
close) (BD_FILE_H *file);
68 int64_t (*
seek) (BD_FILE_H *file, int64_t offset, int32_t origin);
76 int64_t (*
tell) (BD_FILE_H *file);
86 int (*
eof) (BD_FILE_H *file);
96 int64_t (*
read) (BD_FILE_H *file, uint8_t *buf, int64_t size);
108 int64_t (*
write) (BD_FILE_H *file,
const uint8_t *buf, int64_t size);
155 typedef BD_FILE_H* (*BD_FILE_OPEN)(
const char* filename,
const char *mode);
165 typedef BD_DIR_H* (*BD_DIR_OPEN) (
const char* dirname);
BD_DIR_OPEN bd_register_dir(BD_DIR_OPEN p)
Register function pointer that will be used to open a directory.
BD_FILE_H *(* BD_FILE_OPEN)(const char *filename, const char *mode)
Open a file.
Definition: filesystem.h:155
BD_DIR_H *(* BD_DIR_OPEN)(const char *dirname)
Open a directory.
Definition: filesystem.h:165
BD_FILE_OPEN bd_register_file(BD_FILE_OPEN p)
Register function pointer that will be used to open a file.
Directory entry.
Definition: filesystem.h:116
Directory access.
Definition: filesystem.h:126
void(* close)(BD_DIR_H *dir)
Close directory stream.
Definition: filesystem.h:134
int(* read)(BD_DIR_H *dir, BD_DIRENT *entry)
Read next directory entry.
Definition: filesystem.h:143
File access.
Definition: filesystem.h:43
int64_t(* tell)(BD_FILE_H *file)
Get current read or write position.
Definition: filesystem.h:76
void(* close)(BD_FILE_H *file)
Close file.
Definition: filesystem.h:54
int64_t(* read)(BD_FILE_H *file, uint8_t *buf, int64_t size)
Read from file.
Definition: filesystem.h:96
int(* eof)(BD_FILE_H *file)
Check for end of file.
Definition: filesystem.h:86
int64_t(* seek)(BD_FILE_H *file, int64_t offset, int32_t origin)
Reposition file offset.
Definition: filesystem.h:68
int64_t(* write)(BD_FILE_H *file, const uint8_t *buf, int64_t size)
Write to file.
Definition: filesystem.h:108