1#ifndef COASTLINE_PLATFORM_WIN_FILEIO_H
2#define COASTLINE_PLATFORM_WIN_FILEIO_H
bool FCHK_FRead(void *pBuffer, size_t nSize, size_t nCount, GameFile *pFile)
Read items of a file.
void CHK_FPutS(const char *text, GameFile *file)
Write a string, reporting a failure before ending the process.
void * CHK_ReAllocateMemory(void *pMemory, size_t nSize, const char *szCaller)
Resize an allocation, ending the process on failure for a nonzero size.
int CHK_FileExists(const char *pszPath)
Whether a file can be opened for reading.
char * FileReadLine(char *pszLine, int nSize, GameFile *pFile)
Read a line of a file.
int g_bVerboseFileTrace
Whether the routines write each file they open or close to the debugger.
GameFile * CHK_FWriteOpen(const char *path, const char *mode)
Open a file in the requested mode, reporting a failure before ending the process.
GameFile * CHK_FReadOpen(const char *pszPath)
Open a file for reading in binary mode.
void CHK_FClose(GameFile *pFile)
Close a file and free it.
void ReadEntireFile(void *buffer, const char *path, int size)
Read size bytes from path into buffer, or the entire file when size is negative.
long GetFileLength(GameFile *pFile)
The length of a file, leaving its position unchanged.
void * CHK_AllocateMemory(size_t nSize, const char *szCaller)
Allocate memory, ending the process when none is left.
void * CHK_FRead(void *pBuffer, size_t nSize, size_t nCount, GameFile *pFile)
Read items of a file.
A file opened by the checked read or write routines.
Definition fileio.h:33
FILE * pFile
Definition fileio.h:34
char * pszPath
Definition fileio.h:35