Initial commit
This commit is contained in:
67
application/target/fileSystem.h
Normal file
67
application/target/fileSystem.h
Normal file
@@ -0,0 +1,67 @@
|
||||
#ifndef _fileSystem
|
||||
|
||||
#define _fileSystem
|
||||
|
||||
|
||||
// Macros
|
||||
|
||||
|
||||
|
||||
#include "stdlib.h"
|
||||
|
||||
extern char * __ClassNames[];
|
||||
|
||||
|
||||
// Includes
|
||||
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
#include <dirent.h>
|
||||
|
||||
#include <char.h>
|
||||
|
||||
#include <console.h>
|
||||
|
||||
#include <array.h>
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include <http.h>
|
||||
|
||||
|
||||
typedef struct fileSystem{
|
||||
|
||||
unsigned short __classIndex;
|
||||
|
||||
|
||||
} fileSystem;
|
||||
|
||||
void fileSystem_writeFile( fileSystem * this, char * filepath, char * data );
|
||||
|
||||
struct array * fileSystem_readDir( fileSystem * this, char * filePath );
|
||||
|
||||
struct text * fileSystem_readFile( fileSystem * this, char * name, char * mode );
|
||||
|
||||
char * fileSystem_readBinaryFile( fileSystem * this, char * name, char * mode, int * size );
|
||||
|
||||
int fileSystem_ensureDirectory( fileSystem * this, char * path );
|
||||
|
||||
int fileSystem_makeDirectory( fileSystem * this, char * path );
|
||||
|
||||
int fileSystem_exists( fileSystem * this, char * path );
|
||||
|
||||
extern struct fileSystem * filesystem;
|
||||
|
||||
fileSystem fileSystem_new( );
|
||||
|
||||
fileSystem * fileSystem_newPointer( );
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user