pub(crate) fn sanitize_filename(name: &str) -> String
Expand description
Create a safe name based on a messy input string.
The safe name will be a valid filename on Unix and Windows and not contain any path separators. The input can contain path segments separated by either Unix or Windows path separators, the rightmost non-empty segment will be used as name, sanitised for special characters.