atomicds.core.utils.normalize_path¶
- atomicds.core.utils.normalize_path(path_str: str) Path[source]
Normalize a file path string for use with pathlib.
- This will:
Remove control characters and convert “smart” quotes into plain quotes.
Strip leading/trailing whitespace and any surrounding quotes.
Expand user (~) and environment variables.
Normalize Unicode, unify separators, and collapse “..”/“.” segments.
- Parameters:
path_str (
str) – Raw path string copied from Windows (may contain spaces, smart quotes, stray control chars, etc.)- Return type:
Path- Returns:
A pathlib.Path pointing to the normalized path.