File.monitor

Obtains a file or directory monitor for the given file, depending on the type of the file.

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 gio.types.IOErrorEnum.Cancelled will be returned.

Parameters

flags gio.types.FileMonitorFlags

a set of #GFileMonitorFlags

cancellable gio.cancellable.Cancellable

optional #GCancellable object, null to ignore

Return Value

Type: gio.file_monitor.FileMonitor

a #GFileMonitor for the given file, or null on error. Free the returned object with gobject.object.ObjectG.unref.