[−][src]Trait gio::FileMonitorExt
Required methods
fn cancel(&self) -> bool
fn emit_event<P: IsA<File>, Q: IsA<File>>(
&self,
child: &P,
other_file: &Q,
event_type: FileMonitorEvent
)
&self,
child: &P,
other_file: &Q,
event_type: FileMonitorEvent
)
Emits the FileMonitor::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][g-main-context-push-thread-default] of the thread that the monitor was created in.
child
a File.
other_file
a File.
event_type
a set of FileMonitorEvent flags.
fn is_cancelled(&self) -> bool
fn set_rate_limit(&self, limit_msecs: i32)
Sets the rate limit to which the self will report
consecutive change events to the same file.
limit_msecs
a non-negative integer with the limit in milliseconds to poll for changes
fn get_property_cancelled(&self) -> bool
fn get_property_rate_limit(&self) -> i32
fn connect_changed<F: Fn(&Self, &File, Option<&File>, FileMonitorEvent) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
Emitted when file has been changed.
If using FileMonitorFlags::WatchMoves on a directory monitor, and
the information is available (and if supported by the backend),
event_type may be FileMonitorEvent::Renamed,
FileMonitorEvent::MovedIn or FileMonitorEvent::MovedOut.
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 FileMonitorEvent::MovedIn as
equivalent to FileMonitorEvent::Created and
FileMonitorEvent::MovedOut as equivalent to
FileMonitorEvent::Deleted, with extra information.
FileMonitorEvent::Renamed is equivalent to a delete/create
pair. This is exactly how the events will be reported in the case
that the FileMonitorFlags::WatchMoves flag is not in use.
If using the deprecated flag FileMonitorFlags::SendMoved flag and event_type is
FileMonitorEvent::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 None.
file
a File.
other_file
a File or None.
event_type
a FileMonitorEvent.
fn connect_property_cancelled_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_property_rate_limit_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
Implementors
impl<O: IsA<FileMonitor>> FileMonitorExt for O[src]
fn cancel(&self) -> bool[src]
fn emit_event<P: IsA<File>, Q: IsA<File>>(
&self,
child: &P,
other_file: &Q,
event_type: FileMonitorEvent
)[src]
&self,
child: &P,
other_file: &Q,
event_type: FileMonitorEvent
)
fn is_cancelled(&self) -> bool[src]
fn set_rate_limit(&self, limit_msecs: i32)[src]
fn get_property_cancelled(&self) -> bool[src]
fn get_property_rate_limit(&self) -> i32[src]
fn connect_changed<F: Fn(&Self, &File, Option<&File>, FileMonitorEvent) + 'static>(
&self,
f: F
) -> SignalHandlerId[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_cancelled_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_rate_limit_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId[src]
&self,
f: F
) -> SignalHandlerId