#include <stdio.h>
#include "file.h"
#include "../memory/memory.h"
Functions | |
PUBLIC SW32 | FS_FileLength (FILE *stream) |
Calculate file length. | |
PUBLIC SW32 | FS_FileRead (void *ptr, size_t size, size_t nmemb, FILE *stream) |
Reads data from binary file stream. | |
PUBLIC SW32 | FS_FileOpen (const char *filename, FILE **file) |
Open a file stream. | |
PUBLIC SW32 | FS_FileLoad (const char *path, void **buffer) |
Load a file into memory. |
PUBLIC SW32 FS_FileLength | ( | FILE * | stream | ) |
Calculate file length.
[in] | filestream | Pointer to valid FILE structure. |
PUBLIC SW32 FS_FileLoad | ( | const char * | path, | |
void ** | buffer | |||
) |
Load a file into memory.
[in] | path | File name to load. |
[in,out] | buffer | Buffer to hold data |
PUBLIC SW32 FS_FileOpen | ( | const char * | filename, | |
FILE ** | file | |||
) |
Open a file stream.
[in] | filename | Name of file to open. |
[out] | file | FILE pointer. |
PUBLIC SW32 FS_FileRead | ( | void * | ptr, | |
size_t | size, | |||
size_t | nmemb, | |||
FILE * | stream | |||
) |
Reads data from binary file stream.
[in,out] | ptr | Storage location. |
[in] | size | Size of object in bytes. |
[in] | nmemb | Number of objects to read. |
[in] | stream | Stream to read from. |