Skip to content

Instantly share code, notes, and snippets.

View simu's full-sized avatar

Simon Gerber simu

View GitHub Profile
@simu
simu / g_file_monitor.c
Last active March 27, 2020 14:20
File/dir monitoring example using glib/gio.
/*
* Demo for g_file_monitor().
*
* Compile using:
* $ CFLAGS=`pkg-config --cflags gio-2.0` LDLIBS=`pkg-config --libs gio-2.0` make g_file_monitor.c
*
* It is possible to pass either a directory or a file path as argument.
*/
#include <assert.h>
#include <stdio.h>