fswatch 1.21.0
Loading...
Searching...
No Matches
libfswatch.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2014-2026 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 LIBFSW_H
29#define LIBFSW_H
30
31#include <stdbool.h>
32#include "libfswatch_types.h"
33#include "cevent.h"
34#include "cmonitor.h"
35#include "cfilter.h"
36#include "error.h"
37
38# ifdef __cplusplus
39extern "C"
40{
41# endif
42
94
103
108 FSW_STATUS fsw_add_path(const FSW_HANDLE handle, const char * path);
109
113 FSW_STATUS fsw_add_property(const FSW_HANDLE handle, const char * name, const char * value);
114
119 FSW_STATUS fsw_set_allow_overflow(const FSW_HANDLE handle, const bool allow_overflow);
120
128 const FSW_CEVENT_CALLBACK callback,
129 void * data);
130
139 const FSW_CEVENT_CALLBACK_V2 callback,
140 void * data);
141
145 FSW_STATUS fsw_set_latency(const FSW_HANDLE handle, const double latency);
146
152 FSW_STATUS fsw_set_recursive(const FSW_HANDLE handle, const bool recursive);
153
158 FSW_STATUS fsw_set_directory_only(const FSW_HANDLE handle, const bool directory_only);
159
165 const bool follow_symlinks);
166
173 const fsw_event_type_filter event_type);
174
183 const fsw_cmonitor_filter filter);
184
191 const enum fsw_filter_mode mode);
192
205 const fsw_cmonitor_filter filter);
206
212
217
221 bool fsw_is_running(const FSW_HANDLE handle);
222
227
232
236 bool fsw_is_verbose(void);
237
241 void fsw_set_verbose(bool verbose);
242
243# ifdef __cplusplus
244}
245# endif
246
247#endif /* LIBFSW_H */
Event type manipulation.
void(* FSW_CEVENT_CALLBACK_V2)(fsw_cevent_v2 const *const events, const unsigned int event_num, void *data)
Definition cevent.h:176
void(* FSW_CEVENT_CALLBACK)(fsw_cevent const *const events, const unsigned int event_num, void *data)
Definition cevent.h:169
Header of the libfswatch library functions for filter management.
fsw_filter_mode
Path filter evaluation mode.
Definition cfilter.h:53
Header of the libfswatch library defining the monitor types.
fsw_monitor_type
Available monitors.
Definition cmonitor.h:44
Error values.
FSW_STATUS fsw_stop_monitor(const FSW_HANDLE handle)
Definition libfswatch.cpp:921
FSW_STATUS fsw_last_error(void)
Definition libfswatch.cpp:994
FSW_STATUS fsw_add_property(const FSW_HANDLE handle, const char *name, const char *value)
Definition libfswatch.cpp:734
void fsw_set_verbose(bool verbose)
Definition libfswatch.cpp:1004
FSW_HANDLE fsw_init_session(const enum fsw_monitor_type type)
Definition libfswatch.cpp:675
FSW_STATUS fsw_start_monitor(const FSW_HANDLE handle)
Definition libfswatch.cpp:877
FSW_STATUS fsw_set_callback_v2(const FSW_HANDLE handle, const FSW_CEVENT_CALLBACK_V2 callback, void *data)
Definition libfswatch.cpp:762
bool fsw_is_running(const FSW_HANDLE handle)
Definition libfswatch.cpp:867
FSW_STATUS fsw_add_event_type_filter(const FSW_HANDLE handle, const fsw_event_type_filter event_type)
Definition libfswatch.cpp:823
FSW_STATUS fsw_set_latency(const FSW_HANDLE handle, const double latency)
Definition libfswatch.cpp:786
FSW_STATUS fsw_set_recursive(const FSW_HANDLE handle, const bool recursive)
Definition libfswatch.cpp:797
FSW_STATUS fsw_add_prune_filter(const FSW_HANDLE handle, const fsw_cmonitor_filter filter)
Definition libfswatch.cpp:857
FSW_STATUS fsw_set_allow_overflow(const FSW_HANDLE handle, const bool allow_overflow)
Definition libfswatch.cpp:777
FSW_STATUS fsw_set_follow_symlinks(const FSW_HANDLE handle, const bool follow_symlinks)
Definition libfswatch.cpp:814
FSW_STATUS fsw_set_callback(const FSW_HANDLE handle, const FSW_CEVENT_CALLBACK callback, void *data)
Definition libfswatch.cpp:747
FSW_STATUS fsw_destroy_session(const FSW_HANDLE handle)
Definition libfswatch.cpp:947
bool fsw_is_verbose(void)
Definition libfswatch.cpp:999
FSW_STATUS fsw_set_filter_mode(const FSW_HANDLE handle, const enum fsw_filter_mode mode)
Definition libfswatch.cpp:842
FSW_STATUS fsw_set_directory_only(const FSW_HANDLE handle, const bool directory_only)
Definition libfswatch.cpp:805
FSW_STATUS fsw_add_filter(const FSW_HANDLE handle, const fsw_cmonitor_filter filter)
Definition libfswatch.cpp:832
FSW_STATUS fsw_init_library(void)
Definition libfswatch.cpp:522
FSW_STATUS fsw_add_path(const FSW_HANDLE handle, const char *path)
Definition libfswatch.cpp:723
Header of the libfswatch library containing common types.
int FSW_STATUS
Status of a library call.
Definition libfswatch_types.h:49
struct FSW_SESSION * FSW_HANDLE
Handle to a monitoring session.
Definition libfswatch_types.h:44
Definition cfilter.h:59
Event type filter.
Definition cfilter.h:70