Skip to main content

validate_path

Function validate_path 

Source
pub fn validate_path(layout: &StoreLayout, path: &str) -> Result<(), SpecError>
Expand description

Validate that a path conforms to the layout’s path_format rule + lives under the layout’s store_root.

§Errors

  • store-path-not-rooted if path doesn’t start with store_root + "/".
  • store-path-bad-format if the entry name doesn’t match <hash>-<name> (or the algo-colon variant).