# modules/file/file.h File Reference

## Data Structures
struct | file_t
## Defines
#define | FILE_ERR_SD_CARD -1
#define | FILE_ERR_NO_PARTITION -2
#define | FILE_ERR_NO_VOLUME -3
#define | FILE_ERR_UNKNOWN_FS -4
#define | FILE_ERR_OPEN_READ -5
#define | FILE_ERR_OPEN_READ_WITHOUT_CLOSE -6
#define | FILE_ERR_READ -7
#define | FILE_ERR_READCOUNT -8
#define | FILE_ERR_READCLOSE -9
#define | FILE_ERR_WRITE_MALLOC -10
#define | FILE_ERR_OPEN_WRITE -11
#define | FILE_ERR_OPEN_WRITE_WITHOUT_CLOSE -12
#define | FILE_ERR_WRITE -13
#define | FILE_ERR_WRITECOUNT -14
#define | FILE_ERR_WRITECLOSE -15
#define | FILE_ERR_SEEK -16
#define | FILE_ERR_OPEN_DIR -17
#define | FILE_ERR_COPY -18
#define | FILE_ERR_COPY_NO_FILE -19
#define | FILE_ERR_NO_DIR -20
#define | FILE_ERR_NO_FILE -21
#define | FILE_ERR_SYSEX_READ -22
#define | FILE_ERR_MKDIR -23
#define | FILE_ERR_INVALID_SESSION_NAME -24
#define | FILE_ERR_UPDATE_FREE -25
#define | FILE_ERR_REMOVE -26
## Functions
s32 | FILE_Init (u32 mode)
s32 | FILE_CheckSDCard (void)
s32 | FILE_SDCardAvailable (void)
s32 | FILE_VolumeAvailable (void)
u32 | FILE_VolumeBytesFree (void)
u32 | FILE_VolumeBytesTotal (void)
char * | FILE_VolumeLabel (void)
s32 | FILE_UpdateFreeBytes (void)
u32 | FILE_VolumeSectorsPerCluster (void)
u32 | FILE_VolumeCluster2Sector (u32 cluster)
s32 | FILE_ReadOpen (file_t *file, char *filepath)
s32 | FILE_ReadReOpen (file_t *file)
s32 | FILE_ReadClose (file_t *file)
s32 | FILE_ReadSeek (u32 offset)
u32 | FILE_ReadGetCurrentSize (void)
u32 | FILE_ReadGetCurrentPosition (void)
s32 | FILE_ReadBuffer (u8 *buffer, u32 len)
s32 | FILE_ReadBufferUnknownLen (u8 *buffer, u32 len)
s32 | FILE_ReadLine (u8 *buffer, u32 max_len)
s32 | FILE_ReadByte (u8 *byte)
s32 | FILE_ReadHWord (u16 *hword)
s32 | FILE_ReadWord (u32 *word)
s32 | FILE_WriteOpen (char *filepath, u8 create)
s32 | FILE_WriteClose (void)
s32 | FILE_WriteSeek (u32 offset)
u32 | FILE_WriteGetCurrentSize (void)
u32 | FILE_WriteGetCurrentPosition (void)
s32 | FILE_WriteBuffer (u8 *buffer, u32 len)
s32 | FILE_WriteByte (u8 byte)
s32 | FILE_WriteHWord (u16 hword)
s32 | FILE_WriteWord (u32 word)
s32 | FILE_Copy (char *src_file, char *dst_file)
s32 | FILE_MakeDir (char *path)
s32 | FILE_Remove (char *path)
s32 | FILE_FileExists (char *filepath)
s32 | FILE_DirExists (char *path)
s32 | FILE_GetDirs (char *path, char *dir_list, u8 num_of_items, u8 dir_offset)
s32 | FILE_GetFiles (char *path, char *ext_filter, char *file_list, u8 num_of_items, u8 file_offset)
s32 | FILE_FindNextFile (char *path, char *filename, char *ext_filter, char *next_filename)
s32 | FILE_FindPreviousFile (char *path, char *filename, char *ext_filter, char *prev_filename)
s32 | FILE_SendSyxDump (char *path, mios32_midi_port_t port, u32 ms_delay_between_dumps)
s32 | FILE_PrintSDCardInfos (void)
s32 | FILE_SendErrorMessage (s32 error_status)
s32 | FILE_BrowserHandler (mios32_midi_port_t port, char *command)
s32 | FILE_BrowserUploadCallback_Init (s32(*callback_upload)(char *filename))
## Variables
u32 | file_dfs_errno
u8 | file_copy_percentage

## Define Documentation

#define FILE_ERR_COPY -18

#define FILE_ERR_COPY_NO_FILE -19

#define FILE_ERR_INVALID_SESSION_NAME -24

#define FILE_ERR_MKDIR -23

#define FILE_ERR_NO_DIR -20

#define FILE_ERR_NO_FILE -21

#define FILE_ERR_NO_PARTITION -2

#define FILE_ERR_NO_VOLUME -3

#define FILE_ERR_OPEN_DIR -17

#define FILE_ERR_OPEN_READ -5

#define FILE_ERR_OPEN_READ_WITHOUT_CLOSE -6

#define FILE_ERR_OPEN_WRITE -11

#define FILE_ERR_OPEN_WRITE_WITHOUT_CLOSE -12

#define FILE_ERR_READ -7

#define FILE_ERR_READCLOSE -9

#define FILE_ERR_READCOUNT -8

#define FILE_ERR_REMOVE -26

#define FILE_ERR_SD_CARD -1

#define FILE_ERR_SEEK -16

#define FILE_ERR_SYSEX_READ -22

#define FILE_ERR_UNKNOWN_FS -4

#define FILE_ERR_UPDATE_FREE -25

#define FILE_ERR_WRITE -13

#define FILE_ERR_WRITE_MALLOC -10

#define FILE_ERR_WRITECLOSE -15

#define FILE_ERR_WRITECOUNT -14