31 lines
516 B
C
31 lines
516 B
C
/*
|
|
* fs.h
|
|
*
|
|
* Created on: 20.10.2017
|
|
* Author: julian
|
|
*/
|
|
|
|
#ifndef FS_H_
|
|
#define FS_H_
|
|
|
|
#include <stddef.h> // size_t
|
|
|
|
struct path {
|
|
char ** entries;
|
|
size_t len;
|
|
int absolute:1;
|
|
};
|
|
|
|
|
|
extern void path_join(struct path *p1, struct path *p2);
|
|
extern void free_path(struct path *p);
|
|
extern void create_path(struct path * p, const char * fsPath);
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
// behaves like fopen, but uses the path struct as path
|
|
extern FILE * path_fopen(struct path * p, const char * flags);
|
|
|
|
#endif /* FS_H_ */
|