agendafs
A filesystem for your calendar.
git clone git://mccd.space/agendafs| Log | Files | Refs | README | LICENSE | Mail | Website |
path.h (760B)
1 #ifndef path_h_INCLUDED
2 #define path_h_INCLUDED
3 #include "arena.h"
4 #include "util.h"
5 #include <assert.h>
6 #include <errno.h>
7 #include <stdbool.h>
8 #include <stdio.h>
9 #include <stdlib.h>
10 #include <string.h>
11
12 typedef char path;
13
14 path *
15 without_file_extension(arena *m, const path *p);
16
17 path *
18 append_path(arena *m, const path *parentp, const char *childp);
19
20 bool
21 pathIsHidden(const path *p);
22
23 const path *
24 get_filename(const char *full_path);
25
26 path *
27 get_file_extension(arena *m, const path *p);
28
29 char *
30 get_parent_path(arena *ar, const char *path);
31
32 size_t
33 split_path(arena *m, const path *p, char **segments);
34
35 size_t
36 write_to_file(const path *filepath, const char *content);
37
38 path *
39 filename_numbered(const char *filename, size_t n);
40
41 #endif // path_h_INCLUDED