pub fn sanitize_filename(name: &str) -> Result<String>Expand description
Strip path traversal components and return only the final filename.
Removes .. components, path separators, control characters, and NUL bytes.
Unicode filenames are preserved.