store_create_from_parts

Function store_create_from_parts 

Source
pub unsafe extern "C" fn store_create_from_parts(
    context: *mut c_context,
    hash: *const store_path_hash_part,
    name: *const c_char,
    name_len: usize,
) -> *mut StorePath
Expand description

@brief Create a StorePath from its constituent parts (hash and name)

This function constructs a store path from a hash and name, without needing a Store reference or the store directory prefix.

@note Don’t forget to free this path using nix_store_path_free()! @param[out] context Optional, stores error information @param[in] hash The store path hash (20 raw bytes) @param[in] name The store path name (the part after the hash) @param[in] name_len Length of the name string @return owned store path, NULL on error