wut/libraries/libwhb/include/whb/file.h
GaryOderNichts 2c98cc91aa
Some checks failed
C/C++ CI / ubuntu-latest (push) Has been cancelled
Run clang-format
`find . -regex '.*\.\(cpp\|hpp\|cu\|cuh\|c\|h\)' -exec clang-format -style=file -i {} \;`
2025-06-05 11:06:04 +01:00

51 lines
691 B
C

#pragma once
#include <wut.h>
/**
* \defgroup whb_file Filesystem
* \ingroup whb
* @{
*/
#ifdef __cplusplus
extern "C" {
#endif
typedef enum WHBFileError
{
WHB_FILE_OK = 0,
WHB_FILE_FATAL_ERROR = -1,
} WHBFileError;
BOOL
WHBDeInitFileSystem();
int32_t
WHBOpenFile(const char *path,
const char *mode);
uint32_t
WHBGetFileSize(int32_t handle);
uint32_t
WHBReadFile(int32_t handle,
void *buf,
uint32_t size,
uint32_t count);
int32_t
WHBCloseFile(int32_t handle);
char *
WHBReadWholeFile(const char *path,
uint32_t *outSize);
void
WHBFreeWholeFile(char *file);
#ifdef __cplusplus
}
#endif
/** @} */