diff options
author | Nicholas Noll <nbnoll@eml.cc> | 2021-12-05 06:53:03 -0800 |
---|---|---|
committer | Nicholas Noll <nbnoll@eml.cc> | 2021-12-05 06:53:03 -0800 |
commit | 158d9b84f14457136379f42e7c071eb79d87ee6b (patch) | |
tree | 1be32a072934357bc8a777f562fd431af9e3229b /include/base/fs.h | |
parent | 861897dd86ca96410b1c11a8a9cc3086bbcb054f (diff) |
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.
Diffstat (limited to 'include/base/fs.h')
-rw-r--r-- | include/base/fs.h | 12 |
1 files changed, 10 insertions, 2 deletions
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); |