Replaces all occurrences of Posix slashes in provided filepath with NT backslashes >>> posixToNtSlashes('C:/Windows') 'C:\\\\Windows'
(filepath)
| 2309 | return re.search(r"\A[\w]\:", filepath) is not None |
| 2310 | |
| 2311 | def posixToNtSlashes(filepath): |
| 2312 | """ |
| 2313 | Replaces all occurrences of Posix slashes in provided |
| 2314 | filepath with NT backslashes |
| 2315 | |
| 2316 | >>> posixToNtSlashes('C:/Windows') |
| 2317 | 'C:\\\\Windows' |
| 2318 | """ |
| 2319 | |
| 2320 | return filepath.replace('/', '\\') if filepath else filepath |
| 2321 | |
| 2322 | def ntToPosixSlashes(filepath): |
| 2323 | """ |
no test coverage detected
searching dependent graphs…