I need some help with g_file_unmount_mountable_with_operation(). The documentation says it unmounts a file of type G_FILE_TYPE_MOUNTABLE. But in my application I “mounted” a remote connection to an URI via g_file_mount_enclosing_volume() for a GFile object which I created out of the URI string ftp://localhost:77/. This GFile object is of type G_FILE_TYPE_DIRECTORY which I found out using g_file_query_file_type()… .
My question is now: How can I create a GFile object of type G_FILE_TYPE_MOUNTABLE for the given remote URI so that I can unmount the volume again with g_file_unmount_mountable_with_operation?
When I do the following I get an error saying “Operation is not supported” in the callback later on:
And in the Parameters documentation are explained only 5?
Parameters
flags GMountUnmountFlags
Flags affecting the operation.
mount_operation GMountOperation
A GMountOperation, or NULL to avoid user interaction.
The argument can be NULL.
The data is owned by the caller of the function.
cancellable GCancellable
Optional GCancellable object, NULL to ignore.
The argument can be NULL.
The data is owned by the caller of the function.
callback GAsyncReadyCallback
A GAsyncReadyCallback to call when the request is satisfied, or NULL.
user_data gpointer
The data to pass to callback function.