Add: Discovery phase added

Add: StringPool, StringView
This commit is contained in:
0x221E
2026-01-16 16:44:30 +01:00
parent 58d405b397
commit 3829703102
10 changed files with 360 additions and 28 deletions

28
src/io.h Normal file
View File

@@ -0,0 +1,28 @@
#ifndef IO_H
#define IO_H
#include "string.h"
typedef struct Arena Arena;
struct DirEntry
{
StringView path;
unsigned char type;
};
struct DirOpContext
{
Arena* a_f;
StringPool* sp;
};
typedef struct DirEntry DirEntry;
typedef struct DirOpContext DirOpContext;
// a should not contain a trailing slash
StringView path_concat_ss(StringPool* sp, StringView* a, StringView* b);
size_t dir_get_recursive(DirOpContext* doc, StringView* p);
#endif