Archived
1
0
Fork 0

test/t_inotify.c: cleanup and moved to t_notify.c

This commit is contained in:
Henrik Hautakoski 2010-11-11 16:10:18 +01:00
parent 5fd33c5115
commit 1d99ab9eea
2 changed files with 2 additions and 6 deletions

View file

@ -1,40 +0,0 @@
#include <stdio.h>
#include "../src/notify.h"
PROT_SCAN_CALLBACK(my_callback) {
//printf("FROM THREAD -- path: %s; is_dir = %i\n", path, dir);
}
int main(int argc, char *argv[]) {
notify_event *event;
if (argc < 2)
return 1;
notify_init();
if (!notify_add_watch(argv[1]))
return 1;
printf("begin watching on: %s\n", argv[1]);
for (;;) {
event = notify_read(3);
if (event == NULL)
continue;
printf("====================\n"
"Type: %s\n"
"Path: %s\n"
"Filename: %s\n"
"Directory: %u\n"
"====================\n"
, notify_event_typetostr(event), event->path, event->filename, event->dir);
}
return 0;
}