FileMonitor.connectChanged

Connect to Changed signal.

Emitted when file has been changed.

If using gio.types.FileMonitorFlags.WatchMoves on a directory monitor, and the information is available (and if supported by the backend), event_type may be gio.types.FileMonitorEvent.Renamed, gio.types.FileMonitorEvent.MovedIn or gio.types.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 gio.types.FileMonitorEvent.MovedIn as equivalent to gio.types.FileMonitorEvent.Created and gio.types.FileMonitorEvent.MovedOut as equivalent to gio.types.FileMonitorEvent.Deleted, with extra information. gio.types.FileMonitorEvent.Renamed is equivalent to a delete/create pair. This is exactly how the events will be reported in the case that the gio.types.FileMonitorFlags.WatchMoves flag is not in use.

If using the deprecated flag gio.types.FileMonitorFlags.SendMoved flag and event_type is gio.types.FileMonitorEvent.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.

class FileMonitor
ulong
connectChanged
(
T
)
(,
Flag!"After" after = No.After
)
if (
isCallable!T &&
is(ReturnType!T == void)
&&
(
Parameters!T.length < 1 ||
(
ParameterStorageClassTuple!T[0] == ParameterStorageClass.none &&
is(Parameters!T[0] : gio.file.File)
)
)
&&
(
Parameters!T.length < 2 ||
(
ParameterStorageClassTuple!T[1] == ParameterStorageClass.none &&
is(Parameters!T[1] : gio.file.File)
)
)
&&
(
Parameters!T.length < 3 ||
(
ParameterStorageClassTuple!T[2] == ParameterStorageClass.none &&
is(Parameters!T[2] == gio.types.FileMonitorEvent)
)
)
&&
(
Parameters!T.length < 4 ||
(
ParameterStorageClassTuple!T[3] == ParameterStorageClass.none &&
is(Parameters!T[3] : gio.file_monitor.FileMonitor)
)
)
&&
Parameters!T.length < 5
)

Parameters

callback T

signal callback delegate or function to connect

void callback(gio.file.File file, gio.file.File otherFile, gio.types.FileMonitorEvent eventType, gio.file_monitor.FileMonitor fileMonitor)

file a #GFile. (optional)

otherFile a #GFile or #NULL. (optional)

eventType a #GFileMonitorEvent. (optional)

fileMonitor the instance the signal is connected to (optional)

after Flag!"After"

Yes.After to execute callback after default handler, No.After to execute before (default)

Return Value

Type: ulong

Signal ID