MCPcopy Create free account
hub / github.com/aboutcode-org/scancode-toolkit / as_winpath

Function as_winpath

src/commoncode/fileutils.py:176–182  ·  view source on GitHub ↗

r""" Return a Windows-like path using Windows path separators (backslash or "\") for a `location` path.

(location)

Source from the content-addressed store, hash-verified

174
175
176def as_winpath(location):
177 r"""
178 Return a Windows-like path using Windows path separators (backslash or "\") for a
179 `location` path.
180 """
181 location = prepare_path(location)
182 return location.replace("/", "\\")
183
184
185def split_parent_resource(path, force_posix=False):

Callers 2

safe_pathFunction · 0.90
resolveFunction · 0.90

Calls 2

prepare_pathFunction · 0.85
replaceMethod · 0.45

Tested by

no test coverage detected