MCPcopy
hub / github.com/pytest-dev/pytest / get_extended_length_path_str

Function get_extended_length_path_str

src/_pytest/pathlib.py:149–158  ·  view source on GitHub ↗

Convert a path to a Windows extended length path.

(path: str)

Source from the content-addressed store, hash-verified

147
148
149def get_extended_length_path_str(path: str) -> str:
150 """Convert a path to a Windows extended length path."""
151 long_path_prefix = "\\\\?\\"
152 unc_long_path_prefix = "\\\\?\\UNC\\"
153 if path.startswith((long_path_prefix, unc_long_path_prefix)):
154 return path
155 # UNC
156 if path.startswith("\\\\"):
157 return unc_long_path_prefix + path[2:]
158 return long_path_prefix + path
159
160
161def rm_rf(path: Path) -> None:

Callers 2

Calls

no outgoing calls

Tested by 1