diff --git a/doc/ostree-sections.txt b/doc/ostree-sections.txt index 8ef9f026..d8149f1c 100644 --- a/doc/ostree-sections.txt +++ b/doc/ostree-sections.txt @@ -40,7 +40,6 @@ ostree_checksum_file ostree_checksum_file_async ostree_checksum_file_async_finish ostree_create_directory_metadata -ostree_create_temp_dir ostree_validate_structureof_objtype ostree_validate_structureof_csum_v ostree_validate_structureof_checksum_string diff --git a/src/libostree/ostree-core.c b/src/libostree/ostree-core.c index 1ba6646d..e0984ca2 100644 --- a/src/libostree/ostree-core.c +++ b/src/libostree/ostree-core.c @@ -1511,50 +1511,6 @@ zlib_file_header_parse (GVariant *metadata, return ret; } -/** - * ostree_create_temp_dir: - * @dir: Use this as temporary base - * @prefix: (allow-none): Optional prefix - * @suffix: (allow-none): Optional suffix - * @out_file: (out): Path for newly created directory, file, or symbolic link - * @cancellable: Cancellable - * @error: Error - * - * Securely create a randomly-named temporary subdirectory of @dir. - */ -gboolean -ostree_create_temp_dir (GFile *dir, - const char *prefix, - const char *suffix, - GFile **out_file, - GCancellable *cancellable, - GError **error) -{ - gboolean ret = FALSE; - gs_free char *template = NULL; - gs_unref_object GFile *ret_file = NULL; - - if (dir == NULL) - dir = g_file_new_for_path (g_get_tmp_dir ()); - - template = g_strdup_printf ("%s/%s-XXXXXX", - gs_file_get_path_cached (dir), - prefix ? prefix : "tmp"); - - if (mkdtemp (template) == NULL) - { - ot_util_set_error_from_errno (error, errno); - goto out; - } - - ret_file = g_file_new_for_path (template); - - ret = TRUE; - ot_transfer_out_value (out_file, &ret_file); - out: - return ret; -} - /** * ostree_validate_structureof_objtype: * @objtype: diff --git a/src/libostree/ostree-core.h b/src/libostree/ostree-core.h index 789813e2..12ba2498 100644 --- a/src/libostree/ostree-core.h +++ b/src/libostree/ostree-core.h @@ -228,13 +228,6 @@ gboolean ostree_checksum_file_async_finish (GFile *f, GVariant *ostree_create_directory_metadata (GFileInfo *dir_info, GVariant *xattrs); -gboolean ostree_create_temp_dir (GFile *dir, - const char *prefix, - const char *suffix, - GFile **out_file, - GCancellable *cancellable, - GError **error); - /** VALIDATION **/ gboolean ostree_validate_structureof_objtype (guchar objtype,