|
| FileMonitor (FileMonitor && src) noexcept |
|
FileMonitor & | operator= (FileMonitor && src) noexcept |
|
| ~FileMonitor () noexcept override |
|
GFileMonitor * | gobj () |
| Provides access to the underlying C GObject. More...
|
|
const GFileMonitor * | gobj () const |
| Provides access to the underlying C GObject. More...
|
|
GFileMonitor * | gobj_copy () |
| Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. More...
|
|
bool | cancel () |
| Cancels a file monitor. More...
|
|
bool | is_cancelled () const |
| Returns whether the monitor is canceled. More...
|
|
void | set_rate_limit (int limit_msecs) |
| Sets the rate limit to which the monitor will report consecutive change events to the same file. More...
|
|
Glib::SignalProxy< void, const Glib::RefPtr< File > &, const Glib::RefPtr< File > &, FileMonitorEvent > | signal_changed () |
|
Glib::PropertyProxy< int > | property_rate_limit () |
| The limit of the monitor to watch for changes, in milliseconds. More...
|
|
Glib::PropertyProxy_ReadOnly< int > | property_rate_limit () const |
| The limit of the monitor to watch for changes, in milliseconds. More...
|
|
Glib::PropertyProxy_ReadOnly< bool > | property_cancelled () const |
| Whether the monitor has been cancelled. More...
|
|
| Object (const Object &)=delete |
|
Object & | operator= (const Object &)=delete |
|
| Object (Object && src) noexcept |
|
Object & | operator= (Object && src) noexcept |
|
void * | get_data (const QueryQuark & key) |
|
void | set_data (const Quark & key, void *data) |
|
void | set_data (const Quark & key, void *data, DestroyNotify notify) |
|
void | remove_data (const QueryQuark & quark) |
|
void * | steal_data (const QueryQuark & quark) |
|
| ObjectBase (const ObjectBase &)=delete |
|
ObjectBase & | operator= (const ObjectBase &)=delete |
|
void | set_property_value (const Glib::ustring & property_name, const Glib::ValueBase & value) |
| You probably want to use a specific property_*() accessor method instead. More...
|
|
void | get_property_value (const Glib::ustring & property_name, Glib::ValueBase & value) const |
| You probably want to use a specific property_*() accessor method instead. More...
|
|
template<class PropertyType > |
void | set_property (const Glib::ustring & property_name, const PropertyType & value) |
| You probably want to use a specific property_*() accessor method instead. More...
|
|
template<class PropertyType > |
void | get_property (const Glib::ustring & property_name, PropertyType & value) const |
| You probably want to use a specific property_*() accessor method instead. More...
|
|
void | connect_property_changed (const Glib::ustring & property_name, const sigc::slot< void > & slot) |
| You can use the signal_changed() signal of the property proxy instead. More...
|
|
void | connect_property_changed (const Glib::ustring & property_name, sigc::slot< void > && slot) |
| You can use the signal_changed() signal of the property proxy instead. More...
|
|
sigc::connection | connect_property_changed_with_return (const Glib::ustring & property_name, const sigc::slot< void > & slot) |
| You can use the signal_changed() signal of the property proxy instead. More...
|
|
sigc::connection | connect_property_changed_with_return (const Glib::ustring & property_name, sigc::slot< void > && slot) |
| You can use the signal_changed() signal of the property proxy instead. More...
|
|
void | freeze_notify () |
| Increases the freeze count on object. More...
|
|
void | thaw_notify () |
| Reverts the effect of a previous call to freeze_notify(). More...
|
|
virtual void | reference () const |
| Increment the reference count for this object. More...
|
|
virtual void | unreference () const |
| Decrement the reference count for this object. More...
|
|
GObject * | gobj () |
| Provides access to the underlying C GObject. More...
|
|
const GObject * | gobj () const |
| Provides access to the underlying C GObject. More...
|
|
GObject * | gobj_copy () const |
| Give a ref-ed copy to someone. Use for direct struct access. More...
|
|
Monitors a file or directory for changes.
To obtain a FileMonitor for a file or directory, use File::monitor_file() or File::monitor_directory().
To get informed about changes to the file or directory you are monitoring, connect to signal_changed().
- Since glibmm 2.16:
- Slot Prototype:
void on_my_changed(const Glib::RefPtr<File>& file, const Glib::RefPtr<File>& other_file, FileMonitorEvent event_type)
Flags: Run Last
Emitted when file has been changed.
If using FILE_MONITOR_WATCH_MOVES on a directory monitor, and the information is available (and if supported by the backend), event_type may be FILE_MONITOR_EVENT_RENAMED, FILE_MONITOR_EVENT_MOVED_IN or FILE_MONITOR_EVENT_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 FILE_MONITOR_EVENT_MOVED_IN as equivalent to FILE_MONITOR_EVENT_CREATED and FILE_MONITOR_EVENT_MOVED_OUT as equivalent to FILE_MONITOR_EVENT_DELETED, with extra information. FILE_MONITOR_EVENT_RENAMED is equivalent to a delete/create pair. This is exactly how the events will be reported in the case that the FILE_MONITOR_WATCH_MOVES flag is not in use.
If using the deprecated flag FILE_MONITOR_SEND_MOVED flag and event_type is FILE_MONITOR_EVENT_MOVED, file will be set to a File containing the old path, and other_file will be set to a File containing the new path.
In all the other cases, other_file will be set to #nullptr
.
- Parameters
-
file | A File. |
other_file | A File or #nullptr . |
event_type | A FileMonitorEvent. |