mirror of
https://github.com/ostreedev/ostree.git
synced 2024-10-26 17:25:36 +03:00
core: Delete unused ostree_create_temp_dir() API
Nothing was using it. Poof. Gone!
This commit is contained in:
parent
36815f52b5
commit
eeb1f9e07b
@ -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
|
||||
|
@ -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:
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user