+ file_info->parent_file = g_file_get_parent (file_info->file);
+
+ file_info->path_bar->get_info_cancellable =
+ _gtk_file_system_get_info (file_info->path_bar->file_system,
+ file_info->file,
+ "standard::display-name,standard::is-hidden,standard::is-backup",
+ gtk_path_bar_get_info_callback,
+ file_info);
+}
+
+gboolean
+_gtk_path_bar_set_file (GtkPathBar *path_bar,
+ GFile *file,
+ const gboolean keep_trail,
+ GError **error)
+{
+ struct SetFileInfo *info;
+ gboolean result;
+
+ g_return_val_if_fail (GTK_IS_PATH_BAR (path_bar), FALSE);
+ g_return_val_if_fail (G_IS_FILE (file), FALSE);
+
+ result = TRUE;
+
+ /* Check whether the new path is already present in the pathbar as buttons.
+ * This could be a parent directory or a previous selected subdirectory.
+ */
+ if (keep_trail &&
+ gtk_path_bar_check_parent_path (path_bar, file, path_bar->file_system))
+ return TRUE;
+
+ info = g_new0 (struct SetFileInfo, 1);
+ info->file = g_object_ref (file);
+ info->path_bar = path_bar;
+ info->first_directory = TRUE;
+ info->parent_file = g_file_get_parent (info->file);
+
+ if (path_bar->get_info_cancellable)
+ g_cancellable_cancel (path_bar->get_info_cancellable);
+
+ path_bar->get_info_cancellable =
+ _gtk_file_system_get_info (path_bar->file_system,
+ info->file,
+ "standard::display-name,standard::is-hidden,standard::is-backup",
+ gtk_path_bar_get_info_callback,
+ info);
+
+ return TRUE;