### ----------------------------------------------------
### -- Gnome::Gio
### -- Licenses: Artistic-2.0
### -- Authors: Marcel Timmerman
### -- File: lib/Gnome/Gio/File.rakumod
### ----------------------------------------------------
### -- Chunk 6 of 6
() $value, GFileQueryInfoFlags $flags, GCancellable $cancellable, $error is copy --> Bool ) {
  $error .= _get-native-object-no-reffing unless $error ~~ N-GError;

  g_file_set_attribute_int64(
    self._get-native-object-no-reffing, $attribute, $value, $flags, $cancellable, $error
  ).Bool
}

sub g_file_set_attribute_int64 (
  N-GFile $file, gchar-ptr $attribute, gint64 $value, GFlag $flags, GCancellable $cancellable, N-GError $error --> gboolean
) is native(&gio-lib)
  { * }

#-------------------------------------------------------------------------------
# TM:0:set-attribute-string:
=begin pod
=head2 set-attribute-string

Sets I<attribute> of type C<G-FILE-ATTRIBUTE-TYPE-STRING> to I<value>. If I<attribute> is of a different type, this operation will fail.

If I<cancellable> is not C<undefined>, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error C<G-IO-ERROR-CANCELLED> will be returned.

Returns: C<True> if the I<attribute> was successfully set, C<False> otherwise.

  method set-attribute-string ( Str $attribute, Str $value, GFileQueryInfoFlags $flags, GCancellable $cancellable, N-GError $error --> Bool )

=item $attribute; a string containing the attribute's name
=item $value; a string containing the attribute's value
=item $flags; B<Gnome::Gio::FileQueryInfoFlags>
=item $cancellable; optional B<Gnome::Gio::Cancellable> object, C<undefined> to ignore
=item $error; a B<Gnome::Gio::Error>, or C<undefined>
=end pod

method set-attribute-string ( Str $attribute, Str $value, GFileQueryInfoFlags $flags, GCancellable $cancellable, $error is copy --> Bool ) {
  $error .= _get-native-object-no-reffing unless $error ~~ N-GError;

  g_file_set_attribute_string(
    self._get-native-object-no-reffing, $attribute, $value, $flags, $cancellable, $error
  ).Bool
}

sub g_file_set_attribute_string (
  N-GFile $file, gchar-ptr $attribute, gchar-ptr $value, GFlag $flags, GCancellable $cancellable, N-GError $error --> gboolean
) is native(&gio-lib)
  { * }

#-------------------------------------------------------------------------------
# TM:0:set-attribute-uint32:
=begin pod
=head2 set-attribute-uint32

Sets I<attribute> of type C<G-FILE-ATTRIBUTE-TYPE-UINT32> to I<value>. If I<attribute> is of a different type, this operation will fail.

If I<cancellable> is not C<undefined>, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error C<G-IO-ERROR-CANCELLED> will be returned.

Returns: C<True> if the I<attribute> was successfully set to I<value> in the I<file>, C<False> otherwise.

  method set-attribute-uint32 ( Str $attribute, UInt $value, GFileQueryInfoFlags $flags, GCancellable $cancellable, N-GError $error --> Bool )

=item $attribute; a string containing the attribute's name
=item $value; a B<guint32> containing the attribute's new value
=item $flags; a B<Gnome::Gio::FileQueryInfoFlags>
=item $cancellable; optional B<Gnome::Gio::Cancellable> object, C<undefined> to ignore
=item $error; a B<Gnome::Gio::Error>, or C<undefined>
=end pod

method set-attribute-uint32 ( Str $attribute, UInt $value, GFileQueryInfoFlags $flags, GCancellable $cancellable, $error is copy --> Bool ) {
  $error .= _get-native-object-no-reffing unless $error ~~ N-GError;

  g_file_set_attribute_uint32(
    self._get-native-object-no-reffing, $attribute, $value, $flags, $cancellable, $error
  ).Bool
}

sub g_file_set_attribute_uint32 (
  N-GFile $file, gchar-ptr $attribute, guint32 $value, GFlag $flags, GCancellable $cancellable, N-GError $error --> gboolean
) is native(&gio-lib)
  { * }

#-------------------------------------------------------------------------------
# TM:0:set-attribute-uint64:
=begin pod
=head2 set-attribute-uint64

Sets I<attribute> of type C<G-FILE-ATTRIBUTE-TYPE-UINT64> to I<value>. If I<attribute> is of a different type, this operation will fail.

If I<cancellable> is not C<undefined>, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error C<G-IO-ERROR-CANCELLED> will be returned.

Returns: C<True> if the I<attribute> was successfully set to I<value> in the I<file>, C<False> otherwise.

  method set-attribute-uint64 ( Str $attribute, UInt $value, GFileQueryInfoFlags $flags, GCancellable $cancellable, N-GError $error --> Bool )

=item $attribute; a string containing the attribute's name
=item $value; a B<guint64> containing the attribute's new value
=item $flags; a B<Gnome::Gio::FileQueryInfoFlags>
=item $cancellable; optional B<Gnome::Gio::Cancellable> object, C<undefined> to ignore
=item $error; a B<Gnome::Gio::Error>, or C<undefined>
=end pod

method set-attribute-uint64 ( Str $attribute, UInt $value, GFileQueryInfoFlags $flags, GCancellable $cancellable, $error is copy --> Bool ) {
  $error .= _get-native-object-no-reffing unless $error ~~ N-GError;

  g_file_set_attribute_uint64(
    self._get-native-object-no-reffing, $attribute, $value, $flags, $cancellable, $error
  ).Bool
}

sub g_file_set_attribute_uint64 (
  N-GFile $file, gchar-ptr $attribute, guint64 $value, GFlag $flags, GCancellable $cancellable, N-GError $error --> gboolean
) is native(&gio-lib)
  { * }

#-------------------------------------------------------------------------------
# TM:0:set-attributes-async:
=begin pod
=head2 set-attributes-async

Asynchronously sets the attributes of I<file> with I<info>.

For more details, see C<set-attributes-from-info()>, which is the synchronous version of this call.

When the operation is finished, I<callback> will be called. You can then call C<g-file-set-attributes-finish()> to get the result of the operation.

  method set-attributes-async ( GFileInfo $info, GFileQueryInfoFlags $flags, Int() $io_priority, GCancellable $cancellable, GAsyncReadyCallback $callback, Pointer $user_data )

=item $info; a B<Gnome::Gio::FileInfo>
=item $flags; a B<Gnome::Gio::FileQueryInfoFlags>
=item $io_priority; the [I/O priority][io-priority] of the request
=item $cancellable; optional B<Gnome::Gio::Cancellable> object, C<undefined> to ignore
=item $callback; (scope async): a B<Gnome::Gio::AsyncReadyCallback>
=item $user_data; (closure): a B<gpointer>
=end pod

method set-attributes-async ( GFileInfo $info, GFileQueryInfoFlags $flags, Int() $io_priority, GCancellable $cancellable, GAsyncReadyCallback $callback, Pointer $user_data ) {

  g_file_set_attributes_async(
    self._get-native-object-no-reffing, $info, $flags, $io_priority, $cancellable, $callback, $user_data
  );
}

sub g_file_set_attributes_async (
  N-GFile $file, GFileInfo $info, GFlag $flags, int $io_priority, GCancellable $cancellable, GAsyncReadyCallback $callback, gpointer $user_data
) is native(&gio-lib)
  { * }

#-------------------------------------------------------------------------------
# TM:0:set-attributes-finish:
=begin pod
=head2 set-attributes-finish

Finishes setting an attribute started in C<set-attributes-async()>.

Returns: C<True> if the attributes were set correctly, C<False> otherwise.

  method set-attributes-finish ( GAsyncResult $result, GFileInfo $info, N-GError $error --> Bool )

=item $result; a B<Gnome::Gio::AsyncResult>
=item $info; a B<Gnome::Gio::FileInfo>
=item $error; a B<Gnome::Gio::Error>, or C<undefined>
=end pod

method set-attributes-finish ( GAsyncResult $result, GFileInfo $info, $error is copy --> Bool ) {
  $error .= _get-native-object-no-reffing unless $error ~~ N-GError;

  g_file_set_attributes_finish(
    self._get-native-object-no-reffing, $result, $info, $error
  ).Bool
}

sub g_file_set_attributes_finish (
  N-GFile $file, GAsyncResult $result, GFileInfo $info, N-GError $error --> gboolean
) is native(&gio-lib)
  { * }

#-------------------------------------------------------------------------------
# TM:0:set-attributes-from-info:
=begin pod
=head2 set-attributes-from-info

Tries to set all attributes in the B<Gnome::Gio::FileInfo> on the target values, not stopping on the first error.

If there is any error during this operation then I<error> will be set to the first error. Error on particular fields are flagged by setting the "status" field in the attribute value to C<G-FILE-ATTRIBUTE-STATUS-ERROR-SETTING>, which means you can also detect further errors.

If I<cancellable> is not C<undefined>, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error C<G-IO-ERROR-CANCELLED> will be returned.

Returns: C<False> if there was any error, C<True> otherwise.

  method set-attributes-from-info ( GFileInfo $info, GFileQueryInfoFlags $flags, GCancellable $cancellable, N-GError $error --> Bool )

=item $info; a B<Gnome::Gio::FileInfo>
=item $flags; B<Gnome::Gio::FileQueryInfoFlags>
=item $cancellable; optional B<Gnome::Gio::Cancellable> object, C<undefined> to ignore
=item $error; a B<Gnome::Gio::Error>, or C<undefined>
=end pod

method set-attributes-from-info ( GFileInfo $info, GFileQueryInfoFlags $flags, GCancellable $cancellable, $error is copy --> Bool ) {
  $error .= _get-native-object-no-reffing unless $error ~~ N-GError;

  g_file_set_attributes_from_info(
    self._get-native-object-no-reffing, $info, $flags, $cancellable, $error
  ).Bool
}

sub g_file_set_attributes_from_info (
  N-GFile $file, GFileInfo $info, GFlag $flags, GCancellable $cancellable, N-GError $error --> gboolean
) is native(&gio-lib)
  { * }
}}

#`{{
#-------------------------------------------------------------------------------
# TM:0:set-display-name:
=begin pod
=head2 set-display-name

Renames I<file> to the specified display name.

The display name is converted from UTF-8 to the correct encoding for the target filesystem if possible and the I<file> is renamed to this.

If you want to implement a rename operation in the user interface the edit name (B<Gnome::Gio::-FILE-ATTRIBUTE-STANDARD-EDIT-NAME>) should be used as the initial value in the rename widget, and then the result after editing should be passed to C<set-display-name()>.

On success the resulting converted filename is returned.

If I<cancellable> is not C<undefined>, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error C<G-IO-ERROR-CANCELLED> will be returned.

Returns: a B<Gnome::Gio::File> specifying what I<file> was renamed to, or C<undefined> if there was an error. Free the returned object with C<clear-object()>.

  method set-display-name ( Str $display_name, GCancellable $cancellable, N-GError $error --> N-GFile )

=item $display_name; a string
=item $cancellable; optional B<Gnome::Gio::Cancellable> object, C<undefined> to ignore
=item $error; a B<Gnome::Gio::Error>, or C<undefined>
=end pod

method set-display-name ( Str $display_name, GCancellable $cancellable, $error is copy --> N-GFile ) {
  $error .= _get-native-object-no-reffing unless $error ~~ N-GError;

  g_file_set_display_name(
    self._get-native-object-no-reffing, $display_name, $cancellable, $error
  )
}

sub g_file_set_display_name (
  N-GFile $file, gchar-ptr $display_name, GCancellable $cancellable, N-GError $error --> N-GFile
) is native(&gio-lib)
  { * }

#-------------------------------------------------------------------------------
# TM:0:set-display-name-async:
=begin pod
=head2 set-display-name-async

Asynchronously sets the display name for a given B<Gnome::Gio::File>.

For more details, see C<set-display-name()> which is the synchronous version of this call.

When the operation is finished, I<callback> will be called. You can then call C<g-file-set-display-name-finish()> to get the result of the operation.

  method set-display-name-async ( Str $display_name, Int() $io_priority, GCancellable $cancellable, GAsyncReadyCallback $callback, Pointer $user_data )

=item $display_name; a string
=item $io_priority; the [I/O priority][io-priority] of the request
=item $cancellable; optional B<Gnome::Gio::Cancellable> object, C<undefined> to ignore
=item $callback; (scope async): a B<Gnome::Gio::AsyncReadyCallback> to call when the request is satisfied
=item $user_data; (closure): the data to pass to callback function
=end pod

method set-display-name-async ( Str $display_name, Int() $io_priority, GCancellable $cancellable, GAsyncReadyCallback $callback, Pointer $user_data ) {

  g_file_set_display_name_async(
    self._get-native-object-no-reffing, $display_name, $io_priority, $cancellable, $callback, $user_data
  );
}

sub g_file_set_display_name_async (
  N-GFile $file, gchar-ptr $display_name, int $io_priority, GCancellable $cancellable, GAsyncReadyCallback $callback, gpointer $user_data
) is native(&gio-lib)
  { * }

#-------------------------------------------------------------------------------
# TM:0:set-display-name-finish:
=begin pod
=head2 set-display-name-finish

Finishes setting a display name started with C<set-display-name-async()>.

Returns: a B<Gnome::Gio::File> or C<undefined> on error. Free the returned object with C<clear-object()>.

  method set-display-name-finish ( GAsyncResult $res, N-GError $error --> N-GFile )

=item $res; a B<Gnome::Gio::AsyncResult>
=item $error; a B<Gnome::Gio::Error>, or C<undefined>
=end pod

method set-display-name-finish ( GAsyncResult $res, $error is copy --> N-GFile ) {
  $error .= _get-native-object-no-reffing unless $error ~~ N-GError;

  g_file_set_display_name_finish(
    self._get-native-object-no-reffing, $res, $error
  )
}

sub g_file_set_display_name_finish (
  N-GFile $file, GAsyncResult $res, N-GError $error --> N-GFile
) is native(&gio-lib)
  { * }

#-------------------------------------------------------------------------------
# TM:0:start-mountable:
=begin pod
=head2 start-mountable

Starts a file of type B<Gnome::Gio::-FILE-TYPE-MOUNTABLE>. Using I<start-operation>, you can request callbacks when, for instance, passwords are needed during authentication.

If I<cancellable> is not C<undefined>, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error C<G-IO-ERROR-CANCELLED> will be returned.

When the operation is finished, I<callback> will be called. You can then call C<mount-mountable-finish()> to get the result of the operation.

  method start-mountable ( GDriveStartFlags $flags, GMountOperation $start_operation, GCancellable $cancellable, GAsyncReadyCallback $callback, Pointer $user_data )

=item $flags; flags affecting the operation
=item $start_operation; a B<Gnome::Gio::MountOperation>, or C<undefined> to avoid user interaction
=item $cancellable; optional B<Gnome::Gio::Cancellable> object, C<undefined> to ignore
=item $callback; a B<Gnome::Gio::AsyncReadyCallback> to call when the request is satisfied, or C<undefined>
=item $user_data; the data to pass to callback function
=end pod

method start-mountable ( GDriveStartFlags $flags, GMountOperation $start_operation, GCancellable $cancellable, GAsyncReadyCallback $callback, Pointer $user_data ) {

  g_file_start_mountable(
    self._get-native-object-no-reffing, $flags, $start_operation, $cancellable, $callback, $user_data
  );
}

sub g_file_start_mountable (
  N-GFile $file, GDriveStartFlags $flags, GMountOperation $start_operation, GCancellable $cancellable, GAsyncReadyCallback $callback, gpointer $user_data
) is native(&gio-lib)
  { * }

#-------------------------------------------------------------------------------
# TM:0:start-mountable-finish:
=begin pod
=head2 start-mountable-finish

Finishes a start operation. See C<start-mountable()> for details.

Finish an asynchronous start operation that was started with C<g-file-start-mountable()>.

Returns: C<True> if the operation finished successfully. C<False> otherwise.

  method start-mountable-finish ( GAsyncResult $result, N-GError $error --> Bool )

=item $result; a B<Gnome::Gio::AsyncResult>
=item $error; a B<Gnome::Gio::Error>, or C<undefined>
=end pod

method start-mountable-finish ( GAsyncResult $result, $error is copy --> Bool ) {
  $error .= _get-native-object-no-reffing unless $error ~~ N-GError;

  g_file_start_mountable_finish(
    self._get-native-object-no-reffing, $result, $error
  ).Bool
}

sub g_file_start_mountable_finish (
  N-GFile $file, GAsyncResult $result, N-GError $error --> gboolean
) is native(&gio-lib)
  { * }

#-------------------------------------------------------------------------------
# TM:0:stop-mountable:
=begin pod
=head2 stop-mountable

Stops a file of type B<Gnome::Gio::-FILE-TYPE-MOUNTABLE>.

If I<cancellable> is not C<undefined>, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error C<G-IO-ERROR-CANCELLED> will be returned.

When the operation is finished, I<callback> will be called. You can then call C<stop-mountable-finish()> to get the result of the operation.

  method stop-mountable ( GMountUnmountFlags $flags, GMountOperation $mount_operation, GCancellable $cancellable, GAsyncReadyCallback $callback, Pointer $user_data )

=item $flags; flags affecting the operation
=item $mount_operation; a B<Gnome::Gio::MountOperation>, or C<undefined> to avoid user interaction.
=item $cancellable; optional B<Gnome::Gio::Cancellable> object, C<undefined> to ignore
=item $callback; a B<Gnome::Gio::AsyncReadyCallback> to call when the request is satisfied, or C<undefined>
=item $user_data; the data to pass to callback function
=end pod

method stop-mountable ( GMountUnmountFlags $flags, GMountOperation $mount_operation, GCancellable $cancellable, GAsyncReadyCallback $callback, Pointer $user_data ) {

  g_file_stop_mountable(
    self._get-native-object-no-reffing, $flags, $mount_operation, $cancellable, $callback, $user_data
  );
}

sub g_file_stop_mountable (
  N-GFile $file, GFlag $flags, GMountOperation $mount_operation, GCancellable $cancellable, GAsyncReadyCallback $callback, gpointer $user_data
) is native(&gio-lib)
  { * }

#-------------------------------------------------------------------------------
# TM:0:stop-mountable-finish:
=begin pod
=head2 stop-mountable-finish

Finishes an stop operation, see C<stop-mountable()> for details.

Finish an asynchronous stop operation that was started with C<g-file-stop-mountable()>.

Returns: C<True> if the operation finished successfully. C<False> otherwise.

  method stop-mountable-finish ( GAsyncResult $result, N-GError $error --> Bool )

=item $result; a B<Gnome::Gio::AsyncResult>
=item $error; a B<Gnome::Gio::Error>, or C<undefined>
=end pod

method stop-mountable-finish ( GAsyncResult $result, $error is copy --> Bool ) {
  $error .= _get-native-object-no-reffing unless $error ~~ N-GError;

  g_file_stop_mountable_finish(
    self._get-native-object-no-reffing, $result, $error
  ).Bool
}

sub g_file_stop_mountable_finish (
  N-GFile $file, GAsyncResult $result, N-GError $error --> gboolean
) is native(&gio-lib)
  { * }

#-------------------------------------------------------------------------------
# TM:0:supports-thread-contexts:
=begin pod
=head2 supports-thread-contexts

Checks if I<file> supports [thread-default contexts][g-main-context-push-thread-default-context]. If this returns C<False>, you cannot perform asynchronous operations on I<file> in a thread that has a thread-default context.

Returns: Whether or not I<file> supports thread-default contexts.

  method supports-thread-contexts ( --> Bool )

=end pod

method supports-thread-contexts ( --> Bool ) {

  g_file_supports_thread_contexts(
    self._get-native-object-no-reffing,
  ).Bool
}

sub g_file_supports_thread_contexts (
  N-GFile $file --> gboolean
) is native(&gio-lib)
  { * }

#-------------------------------------------------------------------------------
# TM:0:trash:
=begin pod
=head2 trash

Sends I<file> to the "Trashcan", if possible. This is similar to deleting it, but the user can recover it before emptying the trashcan. Not all file systems support trashing, so this call can return the C<G-IO-ERROR-NOT-SUPPORTED> error.

If I<cancellable> is not C<undefined>, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error C<G-IO-ERROR-CANCELLED> will be returned.

Virtual: trash

Returns: C<True> on successful trash, C<False> otherwise.

  method trash ( GCancellable $cancellable, N-GError $error --> Bool )

=item $cancellable; optional B<Gnome::Gio::Cancellable> object, C<undefined> to ignore
=item $error; a B<Gnome::Gio::Error>, or C<undefined>
=end pod

method trash ( GCancellable $cancellable, $error is copy --> Bool ) {
  $error .= _get-native-object-no-reffing unless $error ~~ N-GError;

  g_file_trash(
    self._get-native-object-no-reffing, $cancellable, $error
  ).Bool
}

sub g_file_trash (
  N-GFile $file, GCancellable $cancellable, N-GError $error --> gboolean
) is native(&gio-lib)
  { * }

#-------------------------------------------------------------------------------
# TM:0:trash-async:
=begin pod
=head2 trash-async

Asynchronously sends I<file> to the Trash location, if possible.

Virtual: trash-async

  method trash-async ( Int() $io_priority, GCancellable $cancellable, GAsyncReadyCallback $callback, Pointer $user_data )

=item $io_priority; the [I/O priority][io-priority] of the request
=item $cancellable; optional B<Gnome::Gio::Cancellable> object, C<undefined> to ignore
=item $callback; a B<Gnome::Gio::AsyncReadyCallback> to call when the request is satisfied
=item $user_data; the data to pass to callback function
=end pod

method trash-async ( Int() $io_priority, GCancellable $cancellable, GAsyncReadyCallback $callback, Pointer $user_data ) {

  g_file_trash_async(
    self._get-native-object-no-reffing, $io_priority, $cancellable, $callback, $user_data
  );
}

sub g_file_trash_async (
  N-GFile $file, int $io_priority, GCancellable $cancellable, GAsyncReadyCallback $callback, gpointer $user_data
) is native(&gio-lib)
  { * }

#-------------------------------------------------------------------------------
# TM:0:trash-finish:
=begin pod
=head2 trash-finish

Finishes an asynchronous file trashing operation, started with C<trash-async()>.

Virtual: trash-finish

Returns: C<True> on successful trash, C<False> otherwise.

  method trash-finish ( GAsyncResult $result, N-GError $error --> Bool )

=item $result; a B<Gnome::Gio::AsyncResult>
=item $error; a B<Gnome::Gio::Error>, or C<undefined>
=end pod

method trash-finish ( GAsyncResult $result, $error is copy --> Bool ) {
  $error .= _get-native-object-no-reffing unless $error ~~ N-GError;

  g_file_trash_finish(
    self._get-native-object-no-reffing, $result, $error
  ).Bool
}

sub g_file_trash_finish (
  N-GFile $file, GAsyncResult $result, N-GError $error --> gboolean
) is native(&gio-lib)
  { * }

#-------------------------------------------------------------------------------
# TM:0:unmount-mountable-with-operation:
=begin pod
=head2 unmount-mountable-with-operation

Unmounts a file of type B<Gnome::Gio::-FILE-TYPE-MOUNTABLE>.

If I<cancellable> is not C<undefined>, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error C<G-IO-ERROR-CANCELLED> will be returned.

When the operation is finished, I<callback> will be called. You can then call C<unmount-mountable-finish()> to get the result of the operation.

  method unmount-mountable-with-operation ( GMountUnmountFlags $flags, GMountOperation $mount_operation, GCancellable $cancellable, GAsyncReadyCallback $callback, Pointer $user_data )

=item $flags; flags affecting the operation
=item $mount_operation; a B<Gnome::Gio::MountOperation>, or C<undefined> to avoid user interaction
=item $cancellable; optional B<Gnome::Gio::Cancellable> object, C<undefined> to ignore
=item $callback; (scope async) : a B<Gnome::Gio::AsyncReadyCallback> to call when the request is satisfied, or C<undefined>
=item $user_data; (closure): the data to pass to callback function
=end pod

method unmount-mountable-with-operation ( GMountUnmountFlags $flags, GMountOperation $mount_operation, GCancellable $cancellable, GAsyncReadyCallback $callback, Pointer $user_data ) {

  g_file_unmount_mountable_with_operation(
    self._get-native-object-no-reffing, $flags, $mount_operation, $cancellable, $callback, $user_data
  );
}

sub g_file_unmount_mountable_with_operation (
  N-GFile $file, GFlag $flags, GMountOperation $mount_operation, GCancellable $cancellable, GAsyncReadyCallback $callback, gpointer $user_data
) is native(&gio-lib)
  { * }

#-------------------------------------------------------------------------------
# TM:0:unmount-mountable-with-operation-finish:
=begin pod
=head2 unmount-mountable-with-operation-finish

Finishes an unmount operation, see C<unmount-mountable-with-operation()> for details.

Finish an asynchronous unmount operation that was started with C<g-file-unmount-mountable-with-operation()>.

Returns: C<True> if the operation finished successfully. C<False> otherwise.

  method unmount-mountable-with-operation-finish ( GAsyncResult $result, N-GError $error --> Bool )

=item $result; a B<Gnome::Gio::AsyncResult>
=item $error; a B<Gnome::Gio::Error>, or C<undefined>
=end pod

method unmount-mountable-with-operation-finish ( GAsyncResult $result, $error is copy --> Bool ) {
  $error .= _get-native-object-no-reffing unless $error ~~ N-GError;

  g_file_unmount_mountable_with_operation_finish(
    self._get-native-object-no-reffing, $result, $error
  ).Bool
}

sub g_file_unmount_mountable_with_operation_finish (
  N-GFile $file, GAsyncResult $result, N-GError $error --> gboolean
) is native(&gio-lib)
  { * }
}}

#`{{
#-------------------------------------------------------------------------------
#TM:0:_g_file_new_build_filename:
#`{{
=begin pod
=head2 _g_file_new_build_filename

Constructs a B<Gnome::Gio::File> from a series of elements using the correct separator for filenames.

Using this function is equivalent to calling C<g-build-filename()>, followed by C<new-for-path()> on the result.

Returns: a new B<Gnome::Gio::File>

  method _g_file_new_build_filename ( Str $first_element --> N-GFile )

=item $first_element; (type filename): the first element in the path @...: remaining elements in path, terminated by C<undefined>
=end pod
}}

sub _g_file_new_build_filename ( gchar-ptr $first_element, Any $any = Any --> N-GFile )
  is native(&gio-lib)
  is symbol('g_file_new_build_filename')
  { * }
}}

#-------------------------------------------------------------------------------
#TM:1:_g_file_new_for_commandline_arg:
#`{{
=begin pod
=head2 _g_file_new_for_commandline_arg

Creates a B<Gnome::Gio::File> with the given argument from the command line. The value of I<arg> can be either a URI, an absolute path or a relative path resolved relative to the current working directory. This operation never fails, but the returned object might not support any I/O operation if I<arg> points to a malformed path.

Note that on Windows, this function expects its argument to be in UTF-8 -- not the system code page. This means that you should not use this function with string from argv as it is passed to C<main()>. C<g-win32-get-command-line()> will return a UTF-8 version of the commandline. B<Gnome::Gio::Application> also uses UTF-8 but C<g-application-command-line-create-file-for-arg()> may be more useful for you there. It is also always possible to use this function with B<Gnome::Gio::OptionContext> arguments of type C<G-OPTION-ARG-FILENAME>.

Returns: a new B<Gnome::Gio::File>. Free the returned object with C<clear-object()>.

  method _g_file_new_for_commandline_arg ( Str $arg --> N-GFile )

=item $arg; (type filename): a command line string
=end pod
}}

sub _g_file_new_for_commandline_arg ( gchar-ptr $arg --> N-GFile )
  is native(&gio-lib)
  is symbol('g_file_new_for_commandline_arg')
  { * }

#-------------------------------------------------------------------------------
#TM:1:_g_file_new_for_commandline_arg_and_cwd:
#`{{
=begin pod
=head2 _g_file_new_for_commandline_arg_and_cwd

Creates a B<Gnome::Gio::File> with the given argument from the command line.

This function is similar to C<new-for-commandline-arg()> except that it allows for passing the current working directory as an argument instead of using the current working directory of the process.

This is useful if the commandline argument was given in a context other than the invocation of the current process.

See also C<g-application-command-line-create-file-for-arg()>.

Returns: a new B<Gnome::Gio::File>

  method _g_file_new_for_commandline_arg_and_cwd ( Str $arg, Str $cwd --> N-GFile )

=item $arg; a command line string
=item $cwd; the current working directory of the commandline
=end pod
}}

sub _g_file_new_for_commandline_arg_and_cwd ( gchar-ptr $arg, gchar-ptr $cwd --> N-GFile )
  is native(&gio-lib)
  is symbol('g_file_new_for_commandline_arg_and_cwd')
  { * }

#-------------------------------------------------------------------------------
#TM:1:_g_file_new_for_path:
#`{{
=begin pod
=head2 _g_file_new_for_path

Constructs a B<Gnome::Gio::File> for a given path. This operation never fails, but the returned object might not support any I/O operation if I<path> is malformed.

Returns: a new B<Gnome::Gio::File> for the given I<path>. Free the returned object with C<clear-object()>.

  method _g_file_new_for_path ( Str $path --> N-GFile )

=item $path; (type filename): a string containing a relative or absolute path. The string must be encoded in the glib filename encoding.
=end pod
}}

sub _g_file_new_for_path ( gchar-ptr $path --> N-GFile )
  is native(&gio-lib)
  is symbol('g_file_new_for_path')
  { * }

#-------------------------------------------------------------------------------
#TM:1:_g_file_new_for_uri:
#`{{
=begin pod
=head2 _g_file_new_for_uri

Constructs a B<Gnome::Gio::File> for a given URI. This operation never fails, but the returned object might not support any I/O operation if I<uri> is malformed or if the uri type is not supported.

Returns: a new B<Gnome::Gio::File> for the given I<uri>. Free the returned object with C<clear-object()>.

  method _g_file_new_for_uri ( Str $uri --> N-GFile )

=item $uri; a UTF-8 string containing a URI
=end pod
}}

sub _g_file_new_for_uri ( gchar-ptr $uri --> N-GFile )
  is native(&gio-lib)
  is symbol('g_file_new_for_uri')
  { * }

#`{{
#-------------------------------------------------------------------------------
#TM:0:_g_file_new_tmp:
#`{{
=begin pod
=head2 _g_file_new_tmp

Opens a file in the preferred directory for temporary files (as returned by C<g-get-tmp-dir()>) and returns a B<Gnome::Gio::File> and B<Gnome::Gio::FileIOStream> pointing to it.

I<tmpl> should be a string in the GLib file name encoding containing a sequence of six 'X' characters, and containing no directory components. If it is C<undefined>, a default template is used.

Unlike the other B<Gnome::Gio::File> constructors, this will return C<undefined> if a temporary file could not be created.

Returns: a new B<Gnome::Gio::File>. Free the returned object with C<clear-object()>.

  method _g_file_new_tmp ( Str $tmpl, GFileIOStream $iostream, N-GError $error --> N-GFile )

=item $tmpl; (type filename) : Template for the file name, as in C<open-tmp()>, or C<undefined> for a default template
=item $iostream; on return, a B<Gnome::Gio::FileIOStream> for the created file
=item $error; a B<Gnome::Gio::Error>, or C<undefined>
=end pod
}}

sub _g_file_new_tmp ( gchar-ptr $tmpl, GFileIOStream $iostream, N-GError $error --> N-GFile )
  is native(&gio-lib)
  is symbol('g_file_new_tmp')
  { * }
}}


