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_directory(GFile* file, GFileMonitorFlags flags,
                                       GCancellable* cancellable,
                                       GError** error)
{
    GFileIface* iface;

    g_return_val_if_fail(G_IS_FILE(file), NULL);
    g_return_val_if_fail(~flags & G_FILE_MONITOR_WATCH_HARD_LINKS, NULL);

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

    iface = G_FILE_GET_IFACE(file);

    if (iface->monitor_dir == NULL)
    {
        g_set_error_literal(error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
                            _("Operation not supported"));
        return NULL;
    }

    return (*iface->monitor_dir)(file, flags, cancellable, error);
}
/**
 * g_file_monitor_directory:
 * @file: input #GFile
 * @flags: a set of #GFileMonitorFlags
 * @cancellable: (nullable): optional #GCancellable object,
 *     %NULL to ignore
 * @error: a #GError, or %NULL
 *
 * Obtains a directory monitor for the given file.
 * This may fail if directory monitoring is not supported.
 *
 * 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.
 *
 * It does not make sense for @flags to contain
 * %G_FILE_MONITOR_WATCH_HARD_LINKS, since hard links can not be made to
 * directories.  It is not possible to monitor all the files in a
 * directory for changes made via hard links; if you want to do this then
 * you must register individual watches with g_file_monitor().
 *
 * Virtual: monitor_dir
 * Returns: (transfer full): a #GFileMonitor for the given @file,
 *     or %NULL on error.
 *     Free the returned object with g_object_unref().
 */


Obtains a directory monitor for the given file.
This may fail if directory monitoring is not supported.

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.

It does not make sense for @flags to contain
%G_FILE_MONITOR_WATCH_HARD_LINKS, since hard links can not be made to
directories.  It is not possible to monitor all the files in a
directory for changes made via hard links; if you want to do this then
you must register individual watches with g_file_monitor().

monitor_dir
Returns: (transfer full): a #GFileMonitor for the given @file,
or %NULL on error.
Free the returned object with g_object_unref().
Obtains a directory monitor for the given file . This may fail if directory monitoring is not supported . 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 . It does not make sense for @flags to contain %G_FILE_MONITOR_WATCH_HARD_LINKS since hard links can not be made to directories . It is not possible to monitor all the files in a directory for changes made via hard links ; if you want to do this then you must register individual watches with g_file_monitor () . monitor_dir Returns : ( transfer full ) : a #GFileMonitor for the given @file or %NULL on error . Free the returned object with g_object_unref () .
GFileMonitor* g_file_monitor_directory(GFile* file, GFileMonitorFlags flags,
                                       GCancellable* cancellable,
                                       GError** error)
{
    GFileIface* iface;
    g_return_val_if_fail(G_IS_FILE(file), NULL);
    g_return_val_if_fail(~flags & G_FILE_MONITOR_WATCH_HARD_LINKS, NULL);
    if (g_cancellable_set_error_if_cancelled(cancellable, error))
        return NULL;
    iface = G_FILE_GET_IFACE(file);
    if (iface->monitor_dir == NULL)
    {
        g_set_error_literal(error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
                            _("Operation not supported"));
        return NULL;
    }
    return (*iface->monitor_dir)(file, flags, cancellable, error);
}
GFileMonitor * g_file_monitor_directory ( GFile * file , GFileMonitorFlags flags , GCancellable * cancellable , GError * * error ) { GFileIface * iface ; g_return_val_if_fail ( G_IS_FILE ( file ) , NULL ) ; g_return_val_if_fail ( ~ flags & G_FILE_MONITOR_WATCH_HARD_LINKS , NULL ) ; if ( g_cancellable_set_error_if_cancelled ( cancellable , error ) ) return NULL ; iface = G_FILE_GET_IFACE ( file ) ; if ( iface -> monitor_dir == NULL ) { g_set_error_literal ( error , G_IO_ERROR , G_IO_ERROR_NOT_SUPPORTED , _ ( " " ) ) ; return NULL ; } return ( * iface -> monitor_dir ) ( file , flags , cancellable , error ) ; }
g_file_monitor_directory:
 @file: input #GFile
 @flags: a set of #GFileMonitorFlags
 @cancellable: (nullable): optional #GCancellable object,
     %NULL to ignore
 @error: a #GError, or %NULL
g_file_monitor_directory : @file : input #GFile @flags : a set of #GFileMonitorFlags @cancellable : ( nullable ) : optional #GCancellable object %NULL to ignore @error : a #GError or %NULL