def _join_file_parts(path: str, filename: str, ext: str) -> str:
    """Join together path components to the full path.
    
    Any of the segments can be blank, to skip them.
    """
    return (path + '/' if path else '') + filename + ('.' + ext if ext else '')