#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <stddef.h>
#include <sys/types.h>
#include <libretro.h>
#include <retro_common_api.h>
#include <retro_inline.h>
#include <boolean.h>
#include <stdarg.h>
Go to the source code of this file.
|
typedef typedefRETRO_BEGIN_DECLS struct RFILE | RFILE |
|
|
void | filestream_vfs_init (const struct retro_vfs_interface_info *vfs_info) |
|
int64_t | filestream_get_size (RFILE *stream) |
|
int64_t | filestream_truncate (RFILE *stream, int64_t length) |
|
RFILE * | filestream_open (const char *path, unsigned mode, unsigned hints) |
|
int64_t | filestream_seek (RFILE *stream, int64_t offset, int seek_position) |
|
int64_t | filestream_read (RFILE *stream, void *data, int64_t len) |
|
int64_t | filestream_write (RFILE *stream, const void *data, int64_t len) |
|
int64_t | filestream_tell (RFILE *stream) |
|
void | filestream_rewind (RFILE *stream) |
|
int | filestream_close (RFILE *stream) |
|
int64_t | filestream_read_file (const char *path, void **buf, int64_t *len) |
|
char * | filestream_gets (RFILE *stream, char *s, size_t len) |
|
int | filestream_getc (RFILE *stream) |
|
int | filestream_scanf (RFILE *stream, const char *format,...) |
|
int | filestream_eof (RFILE *stream) |
|
bool | filestream_write_file (const char *path, const void *data, int64_t size) |
|
int | filestream_putc (RFILE *stream, int c) |
|
int | filestream_vprintf (RFILE *stream, const char *format, va_list args) |
|
int | filestream_printf (RFILE *stream, const char *format,...) |
|
int | filestream_error (RFILE *stream) |
|
int | filestream_flush (RFILE *stream) |
|
int | filestream_delete (const char *path) |
|
int | filestream_rename (const char *old_path, const char *new_path) |
|
const char * | filestream_get_path (RFILE *stream) |
|
bool | filestream_exists (const char *path) |
|
char * | filestream_getline (RFILE *stream) |
|
◆ FILESTREAM_REQUIRED_VFS_VERSION [1/2]
#define FILESTREAM_REQUIRED_VFS_VERSION 2 |
◆ FILESTREAM_REQUIRED_VFS_VERSION [2/2]
#define FILESTREAM_REQUIRED_VFS_VERSION 2 |
◆ RFILE
typedef typedefRETRO_BEGIN_DECLS struct RFILE RFILE |
◆ filestream_close()
int filestream_close |
( |
RFILE * |
stream | ) |
|
◆ filestream_delete()
int filestream_delete |
( |
const char * |
path | ) |
|
◆ filestream_eof()
int filestream_eof |
( |
RFILE * |
stream | ) |
|
◆ filestream_error()
int filestream_error |
( |
RFILE * |
stream | ) |
|
◆ filestream_exists()
◆ filestream_flush()
int filestream_flush |
( |
RFILE * |
stream | ) |
|
◆ filestream_get_path()
◆ filestream_get_size()
◆ filestream_getc()
int filestream_getc |
( |
RFILE * |
stream | ) |
|
◆ filestream_getline()
char* filestream_getline |
( |
RFILE * |
stream | ) |
|
◆ filestream_gets()
char* filestream_gets |
( |
RFILE * |
stream, |
|
|
char * |
s, |
|
|
size_t |
len |
|
) |
| |
◆ filestream_open()
RFILE* filestream_open |
( |
const char * |
path, |
|
|
unsigned |
mode, |
|
|
unsigned |
hints |
|
) |
| |
filestream_open: : path to file : file mode to use when opening (read/write) : optional buffer size (-1 or 0 to use default)
Opens a file for reading or writing, depending on the requested mode. Returns a pointer to an RFILE if opened successfully, otherwise NULL.
filestream_open: : path to file : file mode to use when opening (read/write) :
Opens a file for reading or writing, depending on the requested mode. Returns a pointer to an RFILE if opened successfully, otherwise NULL.
◆ filestream_printf()
int filestream_printf |
( |
RFILE * |
stream, |
|
|
const char * |
format, |
|
|
|
... |
|
) |
| |
◆ filestream_putc()
int filestream_putc |
( |
RFILE * |
stream, |
|
|
int |
c |
|
) |
| |
◆ filestream_read()
◆ filestream_read_file()
filestream_read_file: : path to file. : buffer to allocate and read the contents of the file into. Needs to be freed manually.
Read the contents of a file into .
Returns: number of items read, -1 on error.
◆ filestream_rename()
int filestream_rename |
( |
const char * |
old_path, |
|
|
const char * |
new_path |
|
) |
| |
◆ filestream_rewind()
◆ filestream_scanf()
int filestream_scanf |
( |
RFILE * |
stream, |
|
|
const char * |
format, |
|
|
|
... |
|
) |
| |
◆ filestream_seek()
◆ filestream_tell()
◆ filestream_truncate()
◆ filestream_vfs_init()
◆ filestream_vprintf()
int filestream_vprintf |
( |
RFILE * |
stream, |
|
|
const char * |
format, |
|
|
va_list |
args |
|
) |
| |
◆ filestream_write()
◆ filestream_write_file()
filestream_write_file: : path to file. : contents to write to the file. : size of the contents.
Writes data to a file.
Returns: true (1) on success, false (0) otherwise.