ThunarFileMonitor: Thunar Internal Functions Reference Manual

## ThunarFileMonitor ThunarFileMonitor |

## Functions

ThunarFileMonitor * | thunar_file_monitor_get_default ()
void | thunar_file_monitor_file_changed ()
void | thunar_file_monitor_file_destroyed ()

## Signals

void | file-changed | No Hooks
void | file-destroyed | No Hooks

## Object Hierarchy

        GObject
        ╰── ThunarFileMonitor

## Description

## Functions

### thunar_file_monitor_get_default ()

    ThunarFileMonitor *
    thunar_file_monitor_get_default (void);

Returns a reference to the default ThunarFileMonitor instance. The ThunarFileMonitor default instance can be used to monitor the lifecycle of all currently existing ThunarFile instances. The ::file-changed and ::file-destroyed signals will be emitted whenever any of the currently existing ThunarFiles is changed or destroyed.

The caller is responsible to free the returned instance using `g_object_unref()` when no longer needed.

#### Returns

the default ThunarFileMonitor instance.

### thunar_file_monitor_file_changed ()

    void
    thunar_file_monitor_file_changed (ThunarFile *file);

Emits the ::file-changed signal on the default ThunarFileMonitor (if any). This method should only be used by ThunarFile.

#### Parameters

file | a ThunarFile. |

### thunar_file_monitor_file_destroyed ()

    void
    thunar_file_monitor_file_destroyed (ThunarFile *file);

## Signal Details

### The `“file-changed”` signal

    void
    user_function (ThunarFileMonitor *file_monitor,
                   ThunarFile        *file,
                   gpointer           user_data)

This signal is emitted on `file_monitor` whenever any of the currently existing ThunarFile instances changes. `file` identifies the instance that changed.

#### Parameters

file_monitor | the default ThunarFileMonitor. |
file | the ThunarFile that changed. |
user_data | user data set when the signal handler was connected. |

Flags: No Hooks

### The `“file-destroyed”` signal

    void
    user_function (ThunarFileMonitor *file_monitor,
                   ThunarFile        *file,
                   gpointer           user_data)

This signal is emitted on `file_monitor` whenever any of the currently existing ThunarFile instances is about to be destroyed. `file` identifies the instance that is about to be destroyed.

Note that this signal is only emitted if `file` is explicitly destroyed, i.e. because Thunar noticed that it was removed from disk, it is not emitted when the last reference on `file` is released.

#### Parameters

file_monitor | the default ThunarFileMonitor. |
file | the ThunarFile that is about to be destroyed. |
user_data | user data set when the signal handler was connected. |

Flags: No Hooks