Function iroh_blobs::util::fs::key_to_path
source · pub fn key_to_path(
key: impl AsRef<[u8]>,
prefix: Option<String>,
root: Option<PathBuf>
) -> Result<PathBuf>
Expand description
Helper function that translates a key that was derived from the path_to_key
function back
into a path.
If prefix
exists, it will be stripped before converting back to a path
If root
exists, will add the root as a parent to the created path
Removes any null byte that has been appended to the key