or null on error. Free the returned object with [gobject.object.ObjectWrap.unref].
File.monitor
gio.file_monitor.FileMonitor monitor(gio.types.FileMonitorFlags flags, gio.cancellable.Cancellable cancellable = null)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 | a set of #GFileMonitorFlags |
cancellable | optional #GCancellable object, null to ignore |
Returns
a #GFileMonitor for the given file,
Throws
[ErrorWrap]