From 158d9b84f14457136379f42e7c071eb79d87ee6b Mon Sep 17 00:00:00 2001 From: Nicholas Noll Date: Sun, 5 Dec 2021 06:53:03 -0800 Subject: Feat: libbase partitioning. Cleaned up hash map macros. Additionally, fixed varargs cleanup when done with fmt.write. Some system constants were added to allow for directory walking. --- include/base/fs.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'include/base/fs.h') diff --git a/include/base/fs.h b/include/base/fs.h index b2d61c3..dc6ef9e 100644 --- a/include/base/fs.h +++ b/include/base/fs.h @@ -9,9 +9,16 @@ enum }; #undef iota -typedef struct fs·Walker fs·Walker; -typedef struct fs·History fs·History; +typedef struct fs·Walker fs·Walker; +typedef struct fs·History fs·History; +typedef sys·DirEntry fs·DirEntry; +typedef sys·Directory fs·Directory; + +/* node in filesystem */ + +// XXX: simplify with our newer code +/* walk a filesystem hierarchy */ struct fs·Walker { int fd, lev, max, err; @@ -28,6 +35,7 @@ int fs·init(fs·Walker *, char *path); void fs·fini(fs·Walker *); void fs·walk(fs·Walker *); +/* small utilities */ int fs·exists(byte *path, int flag); byte *fs·dirname(byte *path); byte *fs·basename(byte *path); -- cgit v1.2.1