openbmc/build/tmp/deploy/sdk/witherspoon-2019-08-08/sysroots/armv6-openbmc-linux-gnueabi/usr/src/debug/glib-2.0/1_2.60.3-r0/glib-2.60.3/gio/gfile.c
GFileMonitor* g_file_monitor_file(GFile* file, GFileMonitorFlags flags,
                                  GCancellable* cancellable, GError** error)
{
    GFileIface* iface;
    GFileMonitor* monitor;

    g_return_val_if_fail(G_IS_FILE(file), NULL);

    if (g_cancellable_set_error_if_cancelled(cancellable, error))
        return NULL;

    iface = G_FILE_GET_IFACE(file);

    monitor = NULL;

    if (iface->monitor_file)
        monitor = (*iface->monitor_file)(file, flags, cancellable, NULL);

    /* Fallback to polling */
    if (monitor == NULL)
        monitor = _g_poll_file_monitor_new(file);

    return monitor;
}
/**
 * g_file_monitor_file:
 * @file: input #GFile
 * @flags: a set of #GFileMonitorFlags
 * @cancellable: (nullable): optional #GCancellable object,
 *     %NULL to ignore
 * @error: a #GError, or %NULL
 *
 * Obtains a file monitor for the given file. If no file notification
 * mechanism exists, then regular polling of the file is used.
 *
 * If @cancellable is not %NULL, then the operation can be cancelled by
 * triggering the cancellable object from another thread. If the operation
 * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
 *
 * If @flags contains %G_FILE_MONITOR_WATCH_HARD_LINKS then the monitor
 * will also attempt to report changes made to the file via another
 * filename (ie, a hard link). Without this flag, you can only rely on
 * changes made through the filename contained in @file to be
 * reported. Using this flag may result in an increase in resource
 * usage, and may not have any effect depending on the #GFileMonitor
 * backend and/or filesystem type.
 *
 * Returns: (transfer full): a #GFileMonitor for the given @file,
 *     or %NULL on error.
 *     Free the returned object with g_object_unref().
 */


Obtains a file monitor for the given file. If no file notification
mechanism exists, then regular polling of the file is used.

If @cancellable is not %NULL, then the operation can be cancelled by
triggering the cancellable object from another thread. If the operation
was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.

If @flags contains %G_FILE_MONITOR_WATCH_HARD_LINKS then the monitor
will also attempt to report changes made to the file via another
filename . Without this flag, you can only rely on
changes made through the filename contained in @file to be
reported. Using this flag may result in an increase in resource
usage, and may not have any effect depending on the #GFileMonitor
backend and/or filesystem type.

(transfer full): a #GFileMonitor for the given @file,
or %NULL on error.
Free the returned object with g_object_unref().
Obtains a file monitor for the given file . If no file notification mechanism exists then regular polling of the file is used . If @cancellable is not %NULL then the operation can be cancelled by triggering the cancellable object from another thread . If the operation was cancelled the error %G_IO_ERROR_CANCELLED will be returned . If @flags contains %G_FILE_MONITOR_WATCH_HARD_LINKS then the monitor will also attempt to report changes made to the file via another filename . Without this flag you can only rely on changes made through the filename contained in @file to be reported . Using this flag may result in an increase in resource usage and may not have any effect depending on the #GFileMonitor backend and / or filesystem type . ( transfer full ) : a #GFileMonitor for the given @file or %NULL on error . Free the returned object with g_object_unref () .
GFileMonitor* g_file_monitor_file(GFile* file, GFileMonitorFlags flags,
                                  GCancellable* cancellable, GError** error)
{
    GFileIface* iface;
    GFileMonitor* monitor;
    g_return_val_if_fail(G_IS_FILE(file), NULL);
    if (g_cancellable_set_error_if_cancelled(cancellable, error))
        return NULL;
    iface = G_FILE_GET_IFACE(file);
    monitor = NULL;
    if (iface->monitor_file)
        monitor = (*iface->monitor_file)(file, flags, cancellable, NULL);
    if (monitor == NULL)
        monitor = _g_poll_file_monitor_new(file);
    return monitor;
}
GFileMonitor * g_file_monitor_file ( GFile * file , GFileMonitorFlags flags , GCancellable * cancellable , GError * * error ) { GFileIface * iface ; GFileMonitor * monitor ; g_return_val_if_fail ( G_IS_FILE ( file ) , NULL ) ; if ( g_cancellable_set_error_if_cancelled ( cancellable , error ) ) return NULL ; iface = G_FILE_GET_IFACE ( file ) ; monitor = NULL ; if ( iface -> monitor_file ) monitor = ( * iface -> monitor_file ) ( file , flags , cancellable , NULL ) ; if ( monitor == NULL ) monitor = _g_poll_file_monitor_new ( file ) ; return monitor ; }
g_file_monitor_file:
 @file: input #GFile
 @flags: a set of #GFileMonitorFlags
 @cancellable: (nullable): optional #GCancellable object,
     %NULL to ignore
 @error: a #GError, or %NULL
g_file_monitor_file : @file : input #GFile @flags : a set of #GFileMonitorFlags @cancellable : ( nullable ) : optional #GCancellable object %NULL to ignore @error : a #GError or %NULL
/* Fallback to polling */