/* Returns: (transfer full): a #GFile. Free the returned object with g_object_unref().  */
GFile* g_vfs_get_file_for_uri(GVfs *vfs, const char *uri)
/* Returns: (transfer full): a #GFile. Free the returned object with g_object_unref().  */
GFile* g_vfs_get_file_for_uri(GVfs *vfs, const char *uri)
{
  GVfsClass *class;
  g_return_val_if_fail (G_IS_VFS (vfs), NULL);
  g_return_val_if_fail (uri != NULL, NULL);
  class = G_VFS_GET_CLASS (vfs);
  if (g_str_has_prefix (uri, "resource:"))
    return _g_resource_file_new (uri);
  return (* class->get_file_for_uri) (vfs, uri);
}