version 2.8
gfile.h File Reference

Detailed Description

GFILE - File IO Routines header file.

Definition in file gfile.h.

#include "../../gfx.h"
#include <stdarg.h>

Go to the source code of this file.

Functions

bool_t gfileExists (const char *fname)
 Check if file exists. More...
 
bool_t gfileDelete (const char *fname)
 Delete file. More...
 
long int gfileGetFilesize (const char *fname)
 Get the size of a file. More...
 
bool_t gfileRename (const char *oldname, const char *newname)
 Rename file. More...
 
GFILEgfileOpen (const char *fname, const char *mode)
 Open file. More...
 
void gfileClose (GFILE *f)
 Close file. More...
 
size_t gfileRead (GFILE *f, void *buf, size_t len)
 Read from file. More...
 
size_t gfileWrite (GFILE *f, const void *buf, size_t len)
 Write to file. More...
 
long int gfileGetPos (GFILE *f)
 Get the current position of the read/write cursor. More...
 
bool_t gfileSetPos (GFILE *f, long int pos)
 Set the position of the read/write cursor. More...
 
long int gfileGetSize (GFILE *f)
 Get the size of file. More...
 
bool_t gfileEOF (GFILE *f)
 Check for EOF. More...
 
bool_t gfileMount (char fs, const char *drive)
 Mount a logical drive (aka partition) More...
 
bool_t gfileUnmount (char fs, const char *drive)
 Unmount a logical drive (aka partition) More...
 
bool_t gfileSync (GFILE *f)
 Syncs the file object (flushes the buffer) More...
 
gfileList * gfileOpenFileList (char fs, const char *path, bool_t dirs)
 Open a file list. More...
 
const char * gfileReadFileList (gfileList *pfl)
 Get the next file in a file list. More...
 
void gfileCloseFileList (gfileList *pfl)
 Close a file list. More...
 
GFILEgfileOpenChibiOSFileStream (void *FileStreamPtr, const char *mode)
 Open file from a ChibiOS FileStream. More...
 
GFILEgfileOpenMemory (void *memptr, const char *mode)
 Open file from a memory pointer. More...
 
GFILEgfileOpenString (char *str, const char *mode)
 Open file from a null terminated C string. More...
 

Typedefs

typedef struct GFILE GFILE
 A file pointer. More...