38#ifdef JO_COMPILE_WITH_FS_SUPPORT
44# define JO_ROOT_DIR ((const char *)0)
46# define JO_CURRENT_DIR ((const char *)0)
48# define JO_PARENT_DIR ("..")
94 unsigned int *
const files,
const bool reset);
185# define JO_CD_DRIVE_PAUSE (0x01)
187# define JO_CD_DRIVE_PLAY (0x03)
void(*) jo_fs_async_read_callback(char *contents, int length, int optional_token)
Function prototype for ().
Definition fs.h:54
char * jo_fs_read_file_in_dir(const char *const filename, const char *const sub_dir, int *len)
Read a file on the CD.
bool jo_fs_seek_forward(jo_file *const file, unsigned int nbytes)
Seek forward from current position of a file.
char * jo_fs_read_file_ptr(const char *const filename, void *buf, int *len)
Read a file on the CD and put the contents to "buf".
bool jo_fs_file_exists(const char *const filename)
Check if a file is in the current directory of the CD (no error printed when it is not: an optional f...
bool jo_fs_cd(const char *const sub_dir)
Change the current directory (equivalent of Unix cd command).
static __jo_force_inline bool jo_fs_read_file_async(const char *const filename, jo_fs_async_read_callback callback, int optional_token)
Read a file on the CD asynchronously.
Definition fs.h:129
static __jo_force_inline bool jo_fs_read_exact(jo_file *const file, void *const buffer, const unsigned int nbytes)
Read bytes from a file: all of them.
Definition fs.h:172
bool jo_fs_read_file_async_ptr(const char *const filename, jo_fs_async_read_callback callback, int optional_token, void *buf)
Read a file on the CD asynchronously and put the contents to "buf".
void jo_fs_close(jo_file *const file)
Close a file.
static __jo_force_inline char * jo_fs_read_file(const char *const filename, int *len)
Read a file on the CD.
Definition fs.h:101
void jo_fs_set_read_sector_count(const int count)
Set the size of the read buffer of the files opened by jo_fs_open().
bool jo_fs_open(jo_file *const file, const char *const filename)
Open a file.
void jo_fs_get_read_stats(unsigned int *const vblanks, unsigned int *const bytes, unsigned int *const files, const bool reset)
Statistics of the files read by jo_fs_read_file_ptr() (the time of a loading: the CD or the CPU).
void jo_fs_wait_background_jobs(void)
Wait for the end of the reads of jo_fs_read_file_async() (their callbacks called, the files they star...
int jo_fs_read_next_bytes(jo_file *const file, char *buffer, unsigned int nbytes)
Read bytes from a file.
#define __jo_force_inline
force inline attribute (and prevent Doxygen prototype parsing bug)
Definition types.h:39
File definition.
Definition types.h:311