validated_repo_node_key

Function validated_repo_node_key 

Source
pub fn validated_repo_node_key(file: &Path) -> CoreResult<String>
Expand description

Normalize and validate a user-supplied path as a repository-relative node key.

Unlike validated_repo_file_key, this accepts . for the repository root folder so purpose metadata can be set on either folders or files.

ยงErrors

Returns an error when file is absolute, uses a Windows drive prefix, contains parent traversal, is empty, or cannot be represented as UTF-8.