(path)
| 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 | |
| 67 | else: |
| 68 |
no test coverage detected