File: exclude.h

package info (click to toggle)
erofs-utils 1.8.10-1
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 1,128 kB
  • sloc: ansic: 20,839; makefile: 164; sh: 33
file content (34 lines) | stat: -rw-r--r-- 613 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
/*
 * Created by Li Guifu <bluce.lee@aliyun.com>
 */
#ifndef __EROFS_EXCLUDE_H
#define __EROFS_EXCLUDE_H

#ifdef __cplusplus
extern "C"
{
#endif

#include <sys/types.h>
#include <regex.h>

struct erofs_exclude_rule {
	struct list_head list;

	char *pattern;
	regex_t reg;
};

void erofs_exclude_set_root(const char *rootdir);
void erofs_cleanup_exclude_rules(void);

int erofs_parse_exclude_path(const char *args, bool is_regex);
struct erofs_exclude_rule *erofs_is_exclude_path(const char *dir,
						 const char *name);

#ifdef __cplusplus
}
#endif

#endif