normalize_path_to_uri

Function normalize_path_to_uri 

Source
pub fn normalize_path_to_uri(path: &str) -> String
Expand description

Normalizes a path to URI format for consistent object store usage.

If the path is already a URI (contains “://”), returns it as-is. Otherwise, converts local paths to file:// URIs with proper cross-platform handling.

Supported URI schemes:

  • s3:// for AWS S3
  • gs:// or gcs:// for Google Cloud Storage
  • azure:// or abfs:// for Azure Blob Storage
  • http:// or https:// for HTTP/WebDAV
  • file:// for local files

§Cross-platform Path Handling

  • Unix absolute paths: /path/to/filefile:///path/to/file
  • Windows drive paths: C:\path\to\filefile:///C:/path/to/file
  • Windows UNC paths: \\server\share\filefile://server/share/file
  • Relative paths: converted to absolute using current directory