FileIF.monitorDirectory

Obtains a directory monitor for the given file. This may fail if directory monitoring is not supported.

If cancellable is not NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error G_IO_ERROR_CANCELLED will be returned.

It does not make sense for flags to contain G_FILE_MONITOR_WATCH_HARD_LINKS, since hard links can not be made to directories. It is not possible to monitor all the files in a directory for changes made via hard links; if you want to do this then you must register individual watches with g_file_monitor().

interface FileIF
monitorDirectory

Parameters

flags GFileMonitorFlags
cancellable Cancellable

optional gio.Cancellable object, NULL to ignore

Return Value

a gio.FileMonitor for the given file, or NULL on error. Free the returned object with g_object_unref().

Throws

GException on failure.