core: Delete unused ostree_create_temp_dir() API

Nothing was using it.  Poof.  Gone!
This commit is contained in:
Colin Walters 2013-09-04 08:18:45 -04:00
parent 36815f52b5
commit eeb1f9e07b
3 changed files with 0 additions and 52 deletions

View File

@ -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

View File

@ -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:

View File

@ -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,