: nply/liveside

1 
2 
3 
4 
5 
6 
7 
8 
9 
10 
11 
12 
13 
14 
15 
16 
17 
18 
19 
#ifndef LIVESIDE_IGNORE_H
#define LIVESIDE_IGNORE_H

#include <stdbool.h>

#define IGNORE_PATH_MAX 4096

typedef struct ignore_context {
	char root[IGNORE_PATH_MAX];
} ignore_context_t;

void
ignore_init(ignore_context_t *ctx, const char *root);
bool
ignore_path_ignored(const ignore_context_t *ctx, const char *path, bool is_dir);
bool
ignore_is_ignore_file(const char *path);

#endif /* LIVESIDE_IGNORE_H */