It derives from <GObject>.
Monitors a file or directory for changes.
To obtain a <GFileMonitor> for a file or
directory, use file:monitor, file:monitor-file, or file:monitor-directory.
To get informed about changes to the file or directory you are
monitoring, connect to the file-monitor:changed signal. The signal will be emitted in
the thread-default main context (see main-context:push-thread-default) of the
thread that the monitor was created in (though if the global default
main context is blocked, this may cause notifications to be blocked even
if the thread-default context is still running).
parent-instanceWhether the monitor has been cancelled.
Its value is a boolean.
It is read only.
The limit of the monitor to watch for changes, in milliseconds.
Its value is a 32-bit integer.
Set it with (set! (file-monitor:rate-limit self) value).
Cancels a file monitor.
Passed: a <GFileMonitor>.
Returned: a boolean.
always #t
Emits the file-monitor:changed
signal if a change has taken place. Should be called from file monitor
implementations only.
Implementations are responsible to call this method from the
thread-default main context (see main-context:push-thread-default) of the
thread that the monitor was created in.
Passed: a <GFileMonitor>.
Passed: a <GFile>.
a <GFile>.
Passed: a <GFile>, or #f.
a <GFile>, or #f.
Passed: a <GFileMonitorEvent>, or one of
its symbols.
a set of <GFileMonitorEvent> flags.
Returns whether the monitor is canceled.
Passed: a <GFileMonitor>.
Returned: a boolean.
#t if monitor is canceled. #f otherwise.
Sets the rate limit to which the self will report consecutive change events to the same file.
Passed: a <GFileMonitor>.
Passed: a 32-bit integer.
a non-negative integer with the limit in milliseconds to poll for changes
Connect a handler with (connect object file-monitor:changed
handler). It is called as (handler self file other-file
event-type).
Emitted when file has been changed.
If using watch-moves on a directory
monitor, and the information is available (and if supported by the
backend), event-type may be
renamed,
moved-in or
moved-out.
In all cases file will be a child of the monitored directory. For renames, file will be the old name and other-file is the new name. For "moved in" events, file is the name of the file that appeared and other-file is the old name that it was moved from (in another directory). For "moved out" events, file is the name of the file that used to be in this directory and other-file is the name of the file at its new location.
It makes sense to treat moved-in as
equivalent to created and
moved-out as equivalent to
deleted, with extra information.
renamed is equivalent to a delete/create
pair. This is exactly how the events will be reported in the case that
the watch-moves flag is not in use.
If using the deprecated flag send-moved
flag and event-type is moved,
file will be set to a <GFile> containing the
old path, and other-file will be set to a
<GFile> containing the new path.
In all the other cases, other-file will be set to NULL.
Passed: a <GFileMonitor>.
Passed: a <GFile>.
a <GFile>.
Passed: a <GFile>, or #f.
a <GFile> or NULL.
Passed: a <GFileMonitorEvent>.
Cancels a file monitor.
To override it in a new class, give register-type #:vfuncs
`((cancel . ,procedure)). The procedure is called as (procedure
self) ⇒ %return.
Passed: the class whose implementation to call:
<GFileMonitor>, or a class that derives from
it, or its GType number.
Passed: a <GFileMonitor>.
Returned: a boolean.
always #t
To override it in a new class, give register-type #:vfuncs
`((changed . ,procedure)). The procedure is called as
(procedure self file other-file event-type).
Passed: the class whose implementation to call:
<GFileMonitor>, or a class that derives from
it, or its GType number.
Passed: a <GFileMonitor>.
Passed: a <GFile>.
Passed: a <GFile>.
Passed: a <GFileMonitorEvent>, or one of
its symbols.