Skip to main content

validate_path_perms

Function validate_path_perms 

Source
pub fn validate_path_perms(path_str: &String) -> Result<(), Box<dyn Error>>
Expand description

Validate the provided path for writing permissions.

§Arguments

  • path_str - Path to validate

§Returns

  • Ok(()) if the path is valid and writable, Err with a message otherwise

§Panics

  • If unable to get path metadata
  • If unable to create or remove file/directory