aboutsummaryrefslogtreecommitdiffstats
path: root/src/dirvec.h
blob: 0dd7c7a9cf2e471973000d78413ead82cc94b851 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#ifndef DIRVEC_H
#define DIRVEC_H

#include "os_compat.h"

struct dirvec {
	struct directory **base;
	size_t nr;
};

struct directory *dirvec_find(const struct dirvec *dv, const char *path);

int dirvec_delete(struct dirvec *dv, struct directory *del);

void dirvec_add(struct dirvec *dv, struct directory *add);

int dirvec_for_each(const struct dirvec *dv,
                    int (*fn)(struct directory *, void *), void *arg);

#endif /* DIRVEC_H */