summaryrefslogtreecommitdiff
path: root/src/user/lib/fs/dir.h
blob: c3bbfe71025836557bd039ac950be7bbb4f8be91 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#pragma once
#include <camellia/types.h>
#include <stdbool.h>
#include <stddef.h>

struct dirbuild {
	long offset;
	char *buf;
	long bpos, blen;
	long error;
};

void dir_start(struct dirbuild *db, long offset, char *buf, size_t buflen);
bool dir_append(struct dirbuild *db, const char *name);
bool dir_appendl(struct dirbuild *db, const char *name, size_t len);
bool dir_append_from(struct dirbuild *db, handle_t h);
long dir_finish(struct dirbuild *db);