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 );
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 );
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 
55 
56 #ifdef __cplusplus
57 }
58 #endif
59 
60 #endif // _inotifytools_H
int inotifytools_ignore_events_by_regex(char const *pattern, int flags)
int inotifytools_get_max_queued_events()
int inotifytools_watch_recursively_with_exclude(char const *path, int events, char const **exclude_list)
int inotifytools_remove_watch_by_filename(char const *filename)
Definition: inotifytools.c:934
int inotifytools_error()
char * inotifytools_event_to_str_sep(int events, char sep)
Definition: inotifytools.c:658
int inotifytools_initialize()
Definition: inotifytools.c:283
int inotifytools_get_stat_by_wd(int wd, int event)
int inotifytools_watch_recursively(char const *path, int events)
struct inotify_event * inotifytools_next_events(long int timeout, int num_events)
int inotifytools_wd_from_filename(char const *filename)
Definition: inotifytools.c:788
int inotifytools_fprintf(FILE *file, struct inotify_event *event, char *fmt)
int inotifytools_ignore_events_by_inverted_regex(char const *pattern, int flags)
int inotifytools_get_stat_by_filename(char const *filename, int event)
char * inotifytools_event_to_str(int events)
Definition: inotifytools.c:630
void inotifytools_set_filename_by_filename(char const *oldname, char const *newname)
Definition: inotifytools.c:831
int inotifytools_remove_watch_by_wd(int wd)
Definition: inotifytools.c:911
int inotifytools_str_to_event_sep(char const *event, char sep)
Definition: inotifytools.c:473
void inotifytools_cleanup()
Definition: inotifytools.c:328
int inotifytools_watch_files(char const *filenames[], int events)
Definition: inotifytools.c:979
int inotifytools_snprintf(char *out, int size, struct inotify_event *event, char *fmt)
int inotifytools_get_max_user_instances()
int inotifytools_sprintf(char *out, struct inotify_event *event, char *fmt)
int inotifytools_get_num_watches()
int inotifytools_printf(struct inotify_event *event, char *fmt)
int inotifytools_str_to_event(char const *event)
Definition: inotifytools.c:543
void inotifytools_replace_filename(char const *oldname, char const *newname)
Definition: inotifytools.c:861
struct inotify_event * inotifytools_next_event(long int timeout)
void inotifytools_initialize_stats()
Definition: inotifytools.c:420
int inotifytools_get_max_user_watches()
int inotifytools_get_stat_total(int event)
void inotifytools_set_printf_timefmt(char *fmt)
void inotifytools_set_filename_by_wd(int wd, char const *filename)
Definition: inotifytools.c:809
int inotifytools_watch_file(char const *filename, int events)
Definition: inotifytools.c:957
char * inotifytools_filename_from_wd(int wd)
Definition: inotifytools.c:765