GLib::FileMonitor Diff - Ruby-GNOME2 Project Website
Added parts are displayed
Deleted parts are displayed
= class GLib::FileMonitor
Monitors a file or directory for changes.
To obtain a GLib::FileMonitor for a file or directory, use GLib::File#monitor,
GLib::File#monitor_file, or GLib::File#monitor_directory.
To get informed about changes to the file or directory you are monitoring,
connect to the “changed” signal. The signal will be emitted in the
thread-default main context 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
== Object Hierarchy
== Instance Methods
Cancels a file monitor.
* Returns: true if monitor was cancelled
Returns whether or not the monitor has been cancelled.
* Returns: true if the monitor has been cancelled
Gets the limit of the monitor to watch for changes, in milliseconds.
* Returns: The limit of the monitor to watch for changes, in milliseconds
Same as GLib::FileMonitor#set_rate_limit.
* Returns: ((|rate_limit|))
Sets the limit of the monitor to watch for changes, in milliseconds.
* rate_limit: The limit of the monitor to watch for changes, in milliseconds
* Returns: self
A file’s attributes has changed.
A file has changed.
A hint that this was probably the last change in a set of changes.
A file was created.
A file was deleted.
A file wast moved.
A file location will soon be unmounted.
A file location was unmounted.
No flags set
Pair GLib::FileMonitor::EVENT_DELETED and GLib::FileMonitor::EVENT_CREATED
events caused by file renames (moves) and send a single
GLib::FileMonitor::EVENT_MOVED event instead. (Nota bene: not supported on
all backends; the default behaviour – without specifying this flag – is to
send single GLib::FileMonitor::EVENT_DELETED and
Watch for mount events
--- cancelled: true or false (Read)
Whether or not the monitor has been cancelled.
--- rate-limit: Integer (Read/Write)
The limit of the monitor to watch for changes, in milliseconds.
--- changed: self, file, other_file, event_type
This signal is emitted when a file has been changed.
* self: The GLib::FileMonitor emitting the event
* file: A GLib::File
* other_file: A GLib::File
* event_type: A Glib::FileMonitor::Event
== See Also
Search this site
Copyright © 2003-2021 Ruby-GNOME2 Project
This document is distributed under the terms of the
GNU Free Documentation License