libinotifytools

inotifytools.h
Go to the documentation of this file.
1 #ifndef _inotifytools_H
2 #define _inotifytools_H
3
4 #ifdef __cplusplus
5 extern "C"
6 {
7 #endif
8
9 #include <stdio.h>
10
11 int inotifytools_str_to_event(char const * event);
12 int inotifytools_str_to_event_sep(char const * event, char sep);
13 char * inotifytools_event_to_str(int events);
14 char * inotifytools_event_to_str_sep(int events, char sep);
15 void inotifytools_set_filename_by_wd( int wd, char const * filename );
16 void inotifytools_set_filename_by_filename( char const * oldname,
17 char const * newname );
18 void inotifytools_replace_filename( char const * oldname,
19 char const * newname );
20 char * inotifytools_filename_from_wd( int wd );
21 int inotifytools_wd_from_filename( char const * filename );
22 int inotifytools_remove_watch_by_filename( char const * filename );
23 int inotifytools_remove_watch_by_wd( int wd );
24 int inotifytools_watch_file( char const * filename, int events );
25 int inotifytools_watch_files( char const * filenames[], int events );
26 int inotifytools_watch_recursively( char const * path, int events );
27 int inotifytools_watch_recursively_with_exclude( char const * path,
28 int events,
29 char const ** exclude_list );
30 // [UH]
31 int inotifytools_ignore_events_by_regex( char const *pattern, int flags );
32 int inotifytools_ignore_events_by_inverted_regex( char const *pattern, int flags );
33 struct inotify_event * inotifytools_next_event( long int timeout );
34 struct inotify_event * inotifytools_next_events( long int timeout, int num_events );
35 int inotifytools_error();
36 int inotifytools_get_stat_by_wd( int wd, int event );
37 int inotifytools_get_stat_total( int event );
38 int inotifytools_get_stat_by_filename( char const * filename,
39 int event );
40 void inotifytools_initialize_stats();
41 int inotifytools_initialize();
42 void inotifytools_cleanup();
43 int inotifytools_get_num_watches();
44
45 int inotifytools_printf( struct inotify_event* event, char* fmt );
46 int inotifytools_fprintf( FILE* file, struct inotify_event* event, char* fmt );
47 int inotifytools_sprintf( char * out, struct inotify_event* event, char* fmt );
48 int inotifytools_snprintf( char * out, int size, struct inotify_event* event,
49 char* fmt );
50 void inotifytools_set_printf_timefmt( char * fmt );
51
52 int inotifytools_get_max_user_watches();
53 int inotifytools_get_max_user_instances();
54 int inotifytools_get_max_queued_events();
55
56 #ifdef __cplusplus
57 }
58 #endif
59
60 #endif // _inotifytools_H
inotifytools_filename_from_wd
char * inotifytools_filename_from_wd(int wd)
Definition: inotifytools.c:765
inotifytools_snprintf
int inotifytools_snprintf(char *out, int size, struct inotify_event *event, char *fmt)
Definition: inotifytools.c:1821
inotifytools_printf
int inotifytools_printf(struct inotify_event *event, char *fmt)
Definition: inotifytools.c:1667
inotifytools_remove_watch_by_wd
int inotifytools_remove_watch_by_wd(int wd)
Definition: inotifytools.c:911
inotifytools_set_printf_timefmt
void inotifytools_set_printf_timefmt(char *fmt)
Definition: inotifytools.c:1948
inotifytools_get_max_user_watches
int inotifytools_get_max_user_watches()
Definition: inotifytools.c:1990
inotifytools_watch_recursively_with_exclude
int inotifytools_watch_recursively_with_exclude(char const *path, int events, char const **exclude_list)
Definition: inotifytools.c:1289
inotifytools_next_events
struct inotify_event * inotifytools_next_events(long int timeout, int num_events)
Definition: inotifytools.c:1095
inotifytools_sprintf
int inotifytools_sprintf(char *out, struct inotify_event *event, char *fmt)
Definition: inotifytools.c:1770
inotifytools_initialize_stats
void inotifytools_initialize_stats()
Definition: inotifytools.c:420
inotifytools_fprintf
int inotifytools_fprintf(FILE *file, struct inotify_event *event, char *fmt)
Definition: inotifytools.c:1712
inotifytools_event_to_str
char * inotifytools_event_to_str(int events)
Definition: inotifytools.c:630
inotifytools_get_stat_total
int inotifytools_get_stat_total(int event)
Definition: inotifytools.c:1525
inotifytools_set_filename_by_filename
void inotifytools_set_filename_by_filename(char const *oldname, char const *newname)
Definition: inotifytools.c:831
inotifytools_wd_from_filename
int inotifytools_wd_from_filename(char const *filename)
Definition: inotifytools.c:788
inotifytools_set_filename_by_wd
void inotifytools_set_filename_by_wd(int wd, char const *filename)
Definition: inotifytools.c:809
inotifytools_watch_files
int inotifytools_watch_files(char const *filenames[], int events)
Definition: inotifytools.c:979
inotifytools_get_num_watches
int inotifytools_get_num_watches()
Definition: inotifytools.c:1621
inotifytools_get_stat_by_wd
int inotifytools_get_stat_by_wd(int wd, int event)
Definition: inotifytools.c:1502
inotifytools_error
int inotifytools_error()
Definition: inotifytools.c:1595
inotifytools_remove_watch_by_filename
int inotifytools_remove_watch_by_filename(char const *filename)
Definition: inotifytools.c:934
inotifytools_ignore_events_by_inverted_regex
int inotifytools_ignore_events_by_inverted_regex(char const *pattern, int flags)
Definition: inotifytools.c:2059
inotifytools_watch_file
int inotifytools_watch_file(char const *filename, int events)
Definition: inotifytools.c:957
inotifytools_get_max_user_instances
int inotifytools_get_max_user_instances()
Definition: inotifytools.c:1975
inotifytools_cleanup
void inotifytools_cleanup()
Definition: inotifytools.c:328
inotifytools_ignore_events_by_regex
int inotifytools_ignore_events_by_regex(char const *pattern, int flags)
Definition: inotifytools.c:2044
inotifytools_replace_filename
void inotifytools_replace_filename(char const *oldname, char const *newname)
Definition: inotifytools.c:861
inotifytools_next_event
struct inotify_event * inotifytools_next_event(long int timeout)
Definition: inotifytools.c:1042
inotifytools_str_to_event
int inotifytools_str_to_event(char const *event)
Definition: inotifytools.c:543
inotifytools_initialize
int inotifytools_initialize()
Definition: inotifytools.c:283
inotifytools_get_stat_by_filename
int inotifytools_get_stat_by_filename(char const *filename, int event)
Definition: inotifytools.c:1579
inotifytools_str_to_event_sep
int inotifytools_str_to_event_sep(char const *event, char sep)
Definition: inotifytools.c:473
inotifytools_get_max_queued_events
int inotifytools_get_max_queued_events()
Definition: inotifytools.c:1960
inotifytools_event_to_str_sep
char * inotifytools_event_to_str_sep(int events, char sep)
Definition: inotifytools.c:658
inotifytools_watch_recursively
int inotifytools_watch_recursively(char const *path, int events)
Definition: inotifytools.c:1253