libinotifytools
inotifytools/inotifytools.h
Go to the documentation of this file.
00001 #ifndef _inotifytools_H
00002 #define _inotifytools_H
00003 
00004 #ifdef __cplusplus
00005 extern "C"
00006 {
00007 #endif
00008 
00009 #include <stdio.h>
00010 
00011 int inotifytools_str_to_event(char const * event);
00012 int inotifytools_str_to_event_sep(char const * event, char sep);
00013 char * inotifytools_event_to_str(int events);
00014 char * inotifytools_event_to_str_sep(int events, char sep);
00015 void inotifytools_set_filename_by_wd( int wd, char const * filename );
00016 void inotifytools_set_filename_by_filename( char const * oldname,
00017                                             char const * newname );
00018 void inotifytools_replace_filename( char const * oldname,
00019                                     char const * newname );
00020 char * inotifytools_filename_from_wd( int wd );
00021 int inotifytools_wd_from_filename( char const * filename );
00022 int inotifytools_remove_watch_by_filename( char const * filename );
00023 int inotifytools_remove_watch_by_wd( int wd );
00024 int inotifytools_watch_file( char const * filename, int events );
00025 int inotifytools_watch_files( char const * filenames[], int events );
00026 int inotifytools_watch_recursively( char const * path, int events );
00027 int inotifytools_watch_recursively_with_exclude( char const * path,
00028                                                  int events,
00029                                                  char const ** exclude_list );
00030                                                  // [UH]
00031 int inotifytools_ignore_events_by_regex( char const *pattern, int flags );
00032 struct inotify_event * inotifytools_next_event( int timeout );
00033 struct inotify_event * inotifytools_next_events( int timeout, int num_events );
00034 int inotifytools_error();
00035 int inotifytools_get_stat_by_wd( int wd, int event );
00036 int inotifytools_get_stat_total( int event );
00037 int inotifytools_get_stat_by_filename( char const * filename,
00038                                                 int event );
00039 void inotifytools_initialize_stats();
00040 int inotifytools_initialize();
00041 void inotifytools_cleanup();
00042 int inotifytools_get_num_watches();
00043 
00044 int inotifytools_printf( struct inotify_event* event, char* fmt );
00045 int inotifytools_fprintf( FILE* file, struct inotify_event* event, char* fmt );
00046 int inotifytools_sprintf( char * out, struct inotify_event* event, char* fmt );
00047 int inotifytools_snprintf( char * out, int size, struct inotify_event* event,
00048                            char* fmt );
00049 void inotifytools_set_printf_timefmt( char * fmt );
00050 
00051 int inotifytools_get_max_user_watches();
00052 int inotifytools_get_max_user_instances();
00053 int inotifytools_get_max_queued_events();
00054 
00055 #ifdef __cplusplus
00056 }
00057 #endif
00058 
00059 #endif     // _inotifytools_H