50 lines
556 B
C
50 lines
556 B
C
|
|
#ifndef _cache
|
||
|
|
|
||
|
|
#define _cache
|
||
|
|
|
||
|
|
|
||
|
|
// Macros
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
#include "stdlib.h"
|
||
|
|
|
||
|
|
extern char * __ClassNames[];
|
||
|
|
|
||
|
|
|
||
|
|
// Includes
|
||
|
|
|
||
|
|
#include "fileSystem.h"
|
||
|
|
|
||
|
|
#include "file.h"
|
||
|
|
|
||
|
|
#include "text.h"
|
||
|
|
|
||
|
|
#include "array.h"
|
||
|
|
|
||
|
|
|
||
|
|
typedef struct cache{
|
||
|
|
|
||
|
|
struct array * files;
|
||
|
|
|
||
|
|
|
||
|
|
} cache;
|
||
|
|
|
||
|
|
text * cache_getFile( cache * this, char * filePath );
|
||
|
|
|
||
|
|
void cache_addFile( cache * this, char * filePath, struct text * content );
|
||
|
|
|
||
|
|
struct file * cache_getCachedFileByPath( cache * this, char * filePath );
|
||
|
|
|
||
|
|
cache cache_new( );
|
||
|
|
|
||
|
|
cache * cache_newPointer( );
|
||
|
|
|
||
|
|
#endif
|
||
|
|
|
||
|
|
|
||
|
|
typedef struct cache cache;
|
||
|
|
|
||
|
|
|
||
|
|
|