File: file_mask.h

package info (click to toggle)
rhash 1.4.3-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 2,408 kB
  • sloc: ansic: 19,132; sh: 1,196; xml: 933; makefile: 662; python: 431; java: 364; cs: 288; perl: 196; ruby: 76; sed: 16
file content (27 lines) | stat: -rw-r--r-- 642 bytes parent folder | download | duplicates (4)
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
/* file_mask.h */
#ifndef FILE_MASK_H
#define FILE_MASK_H

#include "common_func.h"

#ifdef __cplusplus
extern "C" {
#endif

struct file_t;

/* 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, struct file_t* file);

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

#endif /* FILE_MASK_H */