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
gboolean g_file_copy_attributes(GFile* source, GFile* destination,
                                GFileCopyFlags flags, GCancellable* cancellable,
                                GError** error)
{
    char* attrs_to_read;
    gboolean res;
    GFileInfo* info;
    gboolean source_nofollow_symlinks;

    if (!build_attribute_list_for_copy(destination, flags, &attrs_to_read,
                                       cancellable, error))
        return FALSE;

    source_nofollow_symlinks = flags & G_FILE_COPY_NOFOLLOW_SYMLINKS;

    /* Ignore errors here, if we can't read some info (e.g. if it doesn't exist)
     * we just don't copy it.
     */
    info = g_file_query_info(
        source, attrs_to_read,
        source_nofollow_symlinks ? G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS : 0,
        cancellable, NULL);

    g_free(attrs_to_read);

    res = TRUE;
    if (info)
    {
        res = g_file_set_attributes_from_info(
            destination, info, G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, cancellable,
            error);
        g_object_unref(info);
    }

    return res;
}
/**
 * g_file_copy_attributes:
 * @source: a #GFile with attributes
 * @destination: a #GFile to copy attributes to
 * @flags: a set of #GFileCopyFlags
 * @cancellable: (nullable): optional #GCancellable object,
 *     %NULL to ignore
 * @error: a #GError, %NULL to ignore
 *
 * Copies the file attributes from @source to @destination.
 *
 * Normally only a subset of the file attributes are copied,
 * those that are copies in a normal file copy operation
 * (which for instance does not include e.g. owner). However
 * if #G_FILE_COPY_ALL_METADATA is specified in @flags, then
 * all the metadata that is possible to copy is copied. This
 * is useful when implementing move by copy + delete source.
 *
 * Returns: %TRUE if the attributes were copied successfully,
 *     %FALSE otherwise.
 */


Copies the file attributes from @source to @destination.

Normally only a subset of the file attributes are copied,
those that are copies in a normal file copy operation
(which for instance does not include e.g. owner). However
if #G_FILE_COPY_ALL_METADATA is specified in @flags, then
all the metadata that is possible to copy is copied. This
is useful when implementing move by copy + delete source.

%TRUE if the attributes were copied successfully,
%FALSE otherwise.
Copies the file attributes from @source to @destination . Normally only a subset of the file attributes are copied those that are copies in a normal file copy operation ( which for instance does not include e . g . owner ) . However if #G_FILE_COPY_ALL_METADATA is specified in @flags then all the metadata that is possible to copy is copied . This is useful when implementing move by copy + delete source . %TRUE if the attributes were copied successfully %FALSE otherwise .
gboolean g_file_copy_attributes(GFile* source, GFile* destination,
                                GFileCopyFlags flags, GCancellable* cancellable,
                                GError** error)
{
    char* attrs_to_read;
    gboolean res;
    GFileInfo* info;
    gboolean source_nofollow_symlinks;
    if (!build_attribute_list_for_copy(destination, flags, &attrs_to_read,
                                       cancellable, error))
        return FALSE;
    source_nofollow_symlinks = flags & G_FILE_COPY_NOFOLLOW_SYMLINKS;
    info = g_file_query_info(
        source, attrs_to_read,
        source_nofollow_symlinks ? G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS : 0,
        cancellable, NULL);
    g_free(attrs_to_read);
    res = TRUE;
    if (info)
    {
        res = g_file_set_attributes_from_info(
            destination, info, G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, cancellable,
            error);
        g_object_unref(info);
    }
    return res;
}
gboolean g_file_copy_attributes ( GFile * source , GFile * destination , GFileCopyFlags flags , GCancellable * cancellable , GError * * error ) { char * attrs_to_read ; gboolean res ; GFileInfo * info ; gboolean source_nofollow_symlinks ; if ( ! build_attribute_list_for_copy ( destination , flags , & attrs_to_read , cancellable , error ) ) return FALSE ; source_nofollow_symlinks = flags & G_FILE_COPY_NOFOLLOW_SYMLINKS ; info = g_file_query_info ( source , attrs_to_read , source_nofollow_symlinks ? G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS : 0 , cancellable , NULL ) ; g_free ( attrs_to_read ) ; res = TRUE ; if ( info ) { res = g_file_set_attributes_from_info ( destination , info , G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS , cancellable , error ) ; g_object_unref ( info ) ; } return res ; }
g_file_copy_attributes:
 @source: a #GFile with attributes
 @destination: a #GFile to copy attributes to
 @flags: a set of #GFileCopyFlags
 @cancellable: (nullable): optional #GCancellable object,
     %NULL to ignore
 @error: a #GError, %NULL to ignore
g_file_copy_attributes : @source : a #GFile with attributes @destination : a #GFile to copy attributes to @flags : a set of #GFileCopyFlags @cancellable : ( nullable ) : optional #GCancellable object %NULL to ignore @error : a #GError %NULL to ignore
/* Ignore errors here, if we can't read some info (e.g. if it doesn't exist)
     * we just don't copy it.
     */