Skip to main content

validate_filename

Function validate_filename 

Source
pub fn validate_filename(
    filename: &str,
) -> Result<(), Box<dyn Error + Send + Sync>>
Expand description

Validate that a filename is safe and valid.

ยงErrors

Returns an error if the filename:

  • Contains directory separators
  • Is empty