MCPcopy Create free account
hub / github.com/fabioz/PyDev.Debugger / native_path

Function native_path

interpreterInfo.py:54–65  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

52 import ctypes
53
54 def native_path(path):
55 MAX_PATH = 512 # On cygwin NT, its 260 lately, but just need BIG ENOUGH buffer
56 """Get the native form of the path, like c:\\Foo for /cygdrive/c/Foo"""
57
58 retval = ctypes.create_string_buffer(MAX_PATH)
59 path = fully_normalize_path(path)
60 path = tobytes(path)
61 CCP_POSIX_TO_WIN_A = 0
62 cygwin1dll = ctypes.cdll.LoadLibrary("cygwin1.dll")
63 cygwin1dll.cygwin_conv_path(CCP_POSIX_TO_WIN_A, path, retval, MAX_PATH)
64
65 return retval.value
66
67else:
68

Callers 1

interpreterInfo.pyFile · 0.85

Calls 2

fully_normalize_pathFunction · 0.85
tobytesFunction · 0.85

Tested by

no test coverage detected