fswatch 1.17.1
filter.hpp
Go to the documentation of this file.
1/*
2 * Copyright (c) 2014-2021 Enrico M. Crisostomo
3 *
4 * This program is free software; you can redistribute it and/or modify it under
5 * the terms of the GNU General Public License as published by the Free Software
6 * Foundation; either version 3, or (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
10 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
11 * details.
12 *
13 * You should have received a copy of the GNU General Public License along with
14 * this program. If not, see <http://www.gnu.org/licenses/>.
15 */
28#ifndef FSW__FILTER_H
29# define FSW__FILTER_H
30
31# include <string>
32# include "libfswatch/c/cfilter.h"
33# include <vector>
34
35namespace fsw
36{
59 {
67 std::string text;
68
73
79
89
120 static std::vector<monitor_filter> read_from_file(const std::string& path,
121 void (*err_handler)(
122 std::string) = nullptr);
123 };
124}
125
126#endif /* FSW__FILTER_H */
Header of the libfswatch library functions for filter management.
fsw_filter_type
Event filter type.
Definition: cfilter.h:39
Main namespace of libfswatch.
Definition: event.cpp:24
static std::vector< monitor_filter > read_from_file(const std::string &path, void(*err_handler)(std::string)=nullptr)
Load filters from the specified file.
fsw_filter_type type
Filter type.
Definition: filter.hpp:72
bool extended
Flag indicating whether monitor_filter::text is an extended regular expression.
Definition: filter.hpp:88
bool case_sensitive
Flag indicating whether monitor_filter::text is a case sensitive regular expression.
Definition: filter.hpp:78
monitor_filter { std::string text monitor_filter
Path filters used to accept or reject file change events.
Definition: filter.hpp:67