Monitors a file or directory for changes.
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 running).
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 GLib::FileMonitor::EVENT_CREATED events.)
- Watch for mount events