Go to the documentation of this file. 1 #ifndef __FAT_FILELIB_H__
2 #define __FAT_FILELIB_H__
49 #ifdef FAT_CLUSTER_CACHE_ENTRIES
50 uint32 cluster_cache_idx[FAT_CLUSTER_CACHE_ENTRIES];
51 uint32 cluster_cache_data[FAT_CLUSTER_CACHE_ENTRIES];
64 #define FILE_READ (1 << 0)
65 #define FILE_WRITE (1 << 1)
66 #define FILE_APPEND (1 << 2)
67 #define FILE_BINARY (1 << 3)
68 #define FILE_ERASE (1 << 4)
69 #define FILE_CREATE (1 << 5)
85 void*
fl_fopen(
const char *path,
const char *modifiers);
89 char *
fl_fgets(
char *s,
int n,
void *f);
92 int fl_fwrite(
const void * data,
int size,
int count,
void *
file );
93 int fl_fread(
void * data,
int size,
int count,
void *
file );
116 #ifdef FATFS_INC_TEST_HOOKS
117 struct fatfs* fl_get_fs(
void);
123 #ifdef USE_FILELIB_STDIO_COMPAT_NAMES
127 #define fopen(a,b) fl_fopen(a, b)
128 #define fclose(a) fl_fclose(a)
129 #define fflush(a) fl_fflush(a)
130 #define fgetc(a) fl_fgetc(a)
131 #define fgets(a,b,c) fl_fgets(a, b, c)
132 #define fputc(a,b) fl_fputc(a, b)
133 #define fputs(a,b) fl_fputs(a, b)
134 #define fwrite(a,b,c,d) fl_fwrite(a, b, c, d)
135 #define fread(a,b,c,d) fl_fread(a, b, c, d)
136 #define fseek(a,b,c) fl_fseek(a, b, c)
137 #define fgetpos(a,b) fl_fgetpos(a, b)
138 #define ftell(a) fl_ftell(a)
139 #define feof(a) fl_feof(a)
140 #define remove(a) fl_remove(a)
141 #define mkdir(a) fl_createdirectory(a)
FL_DIR * fl_opendir(const char *path, FL_DIR *dir)
int fl_fseek(void *file, long offset, int origin)
int fl_fputs(const char *str, void *file)
uint8 file_data_sector[512]
int fl_readdir(FL_DIR *dirls, fl_dirent *entry)
struct fat_node list_node
int fl_fwrite(const void *data, int size, int count, void *file)
void * fl_fopen(const char *path, const char *modifiers)
int fl_fread(void *data, int size, int count, void *file)
void fl_listdirectory(const char *path)
int fl_closedir(FL_DIR *dir)
int fl_fgetpos(void *file, uint32 *position)
int fl_fflush(void *file)
#define FATFS_MAX_LONG_FILENAME
int fl_format(uint32 volume_sectors, const char *name)
int(* fn_diskio_write)(uint32 sector, uint8 *buffer, uint32 sector_count)
int fl_attach_media(fn_diskio_read rd, fn_diskio_write wr)
int fl_remove(const char *filename)
struct cluster_lookup last_fat_lookup
int fl_is_dir(const char *path)
void fl_fclose(void *file)
int fl_createdirectory(const char *path)
int fl_fputc(int c, void *file)
char * fl_fgets(char *s, int n, void *f)
void fl_attach_locks(void(*lock)(void), void(*unlock)(void))
int(* fn_diskio_read)(uint32 sector, uint8 *buffer, uint32 sector_count)