File: file_mask.h

package info (click to toggle)
rhash 1.3.8-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,872 kB
  • sloc: ansic: 16,470; sh: 1,075; xml: 863; makefile: 651; java: 360; python: 287; cs: 284; perl: 186; ruby: 74; sed: 16
file content (25 lines) | stat: -rw-r--r-- 623 bytes parent folder | download | duplicates (2)
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
/* file_mask.h */
#ifndef FILE_MASK_H
#define FILE_MASK_H

#ifdef __cplusplus
extern "C" {
#endif

#include "common_func.h"

/* an array to store rules for file acceptance */
typedef struct vector_t file_mask_array;

#define file_mask_new()   rsh_vector_new_simple()
#define file_mask_free(v) rsh_vector_free(v)

file_mask_array* file_mask_new_from_list(const char* comma_separated_list);
void file_mask_add_list(file_mask_array* vect, const char* comma_separated_list);
int file_mask_match(file_mask_array* vect, const char* name);

#ifdef __cplusplus
} /* extern "C" */
#endif /* __cplusplus */

#endif /* FILE_MASK_H */