Added filesystem module
This commit is contained in:
30
src/filesystem.h
Normal file
30
src/filesystem.h
Normal file
@@ -0,0 +1,30 @@
|
||||
/**
|
||||
* Copyright (c) 2016 rxi
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the MIT license. See LICENSE for details.
|
||||
*/
|
||||
|
||||
#ifndef FILESYSTEM_H
|
||||
#define FILESYSTEM_H
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stddef.h>
|
||||
|
||||
enum {
|
||||
FILESYSTEM_ESUCCESS = 0,
|
||||
FILESYSTEM_EFAILURE = -1,
|
||||
};
|
||||
|
||||
const char* filesystem_strerror(int err);
|
||||
void filesystem_deinit(void);
|
||||
int filesystem_mount(const char *path);
|
||||
int filesystem_unmount(const char *path);
|
||||
int filesystem_exists(const char *filename);
|
||||
int filesystem_isFile(const char *filename);
|
||||
int filesystem_isDirectory(const char *filename);
|
||||
void* filesystem_read(const char *filename, int *size);
|
||||
void filesystem_free(void *ptr);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user