iroh_blobs::util::fs

Function path_to_key

Source
pub fn path_to_key(
    path: impl AsRef<Path>,
    prefix: Option<String>,
    root: Option<PathBuf>,
) -> Result<Bytes>
Expand description

Helper function that creates a document key from a canonicalized path, removing the root and adding the prefix, if they exist

Appends the null byte to the end of the key.