kiba-engine
|
Interface to access the platform's filesystem. More...
#include <kiba/defines.h>
Go to the source code of this file.
Data Structures | |
struct | file_handle |
Handle for a file. More... | |
Typedefs | |
typedef enum file_modes | file_modes |
The modes a file can be opened in. More... | |
typedef struct file_handle | file_handle |
Handle for a file. | |
Enumerations | |
enum | file_modes { FILE_MODE_READ = 1 , FILE_MODE_WRITE = 2 , FILE_MODE_APPEND = 4 } |
The modes a file can be opened in. More... | |
Functions | |
KB_API b8 | filesystem_exists (const char *path) |
Check if a given path exists. More... | |
KB_API b8 | filesystem_open (file_handle *file, const char *path, b8 binary, file_modes modes) |
KB_API void | filesystem_close (file_handle *file) |
KB_API b8 | filesystem_size (file_handle *file, usize *size) |
KB_API b8 | filesystem_read (file_handle *file, usize size, void *out, usize *bytes_read) |
KB_API b8 | filesystem_read_line (file_handle *file, usize max_size, char *out, usize *chars_read) |
KB_API b8 | filesystem_read_all (file_handle *file, usize max_size, void *out, usize *bytes_read) |
KB_API b8 | filesystem_read_all_text (file_handle *file, usize max_size, char *out, usize *chars_read) |
KB_API b8 | filesystem_write (file_handle *file, usize size, const void *data, usize *bytes_written) |
KB_API b8 | filesystem_write_line (file_handle *file, usize size, const char *data, usize *chars_written) |
Interface to access the platform's filesystem.
Definition in file filesystem.h.
typedef enum file_modes file_modes |
The modes a file can be opened in.
Any combination of them are valid.
enum file_modes |
The modes a file can be opened in.
Any combination of them are valid.
Definition at line 15 of file filesystem.h.
KB_API b8 filesystem_exists | ( | const char * | path | ) |
Check if a given path exists.
Path can point to a file or directory.
path | the path to the file |
Definition at line 16 of file filesystem.c.