[ostree] core: Delete unused ostree_create_temp_dir() API



commit eeb1f9e07bb7d4830361c7c8ad9babf7705b9c7e
Author: Colin Walters <walters verbum org>
Date:   Wed Sep 4 08:18:45 2013 -0400

    core: Delete unused ostree_create_temp_dir() API
    
    Nothing was using it.  Poof.  Gone!

 doc/ostree-sections.txt     |    1 -
 src/libostree/ostree-core.c |   44 -------------------------------------------
 src/libostree/ostree-core.h |    7 ------
 3 files changed, 0 insertions(+), 52 deletions(-)
---
diff --git a/doc/ostree-sections.txt b/doc/ostree-sections.txt
index 8ef9f02..d8149f1 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 1ba6646..e0984ca 100644
--- a/src/libostree/ostree-core.c
+++ b/src/libostree/ostree-core.c
@@ -1512,50 +1512,6 @@ zlib_file_header_parse (GVariant         *metadata,
 }
 
 /**
- * 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:
  * @error: Error
diff --git a/src/libostree/ostree-core.h b/src/libostree/ostree-core.h
index 789813e..12ba249 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,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]