Skip to main content

nix_store_path_hash

Function nix_store_path_hash 

Source
pub unsafe extern "C" fn nix_store_path_hash(
    context: *mut nix_c_context,
    store_path: *const StorePath,
    hash_part_out: *mut nix_store_path_hash_part,
) -> nix_err
Expand description

Get the path hash (e.g. “” in /nix/store/-) The hash is returned as raw bytes, decoded from “nix32” encoding.

§Arguments

  • context [out] - Optional, stores error information
  • store_path [in] - the path to get the hash from
  • hash_part_out [out] - the decoded hash as 20 raw bytes

§Returns

NIX_OK on success, error code on failure