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

flagsa set of #GFileMonitorFlags
cancellableoptional #GCancellable object, null to ignore

Returns

a #GFileMonitor for the given file,

or null on error. Free the returned object with [gobject.object.ObjectWrap.unref].

Throws

[ErrorWrap]