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:
  1. Remove control characters and convert “smart” quotes into plain quotes.

  2. Strip leading/trailing whitespace and any surrounding quotes.

  3. Expand user (~) and environment variables.

  4. 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.