MCPcopy Index your code
hub / github.com/sqlmapproject/sqlmap / posixToNtSlashes

Function posixToNtSlashes

lib/core/common.py:2311–2320  ·  view source on GitHub ↗

Replaces all occurrences of Posix slashes in provided filepath with NT backslashes >>> posixToNtSlashes('C:/Windows') 'C:\\\\Windows'

(filepath)

Source from the content-addressed store, hash-verified

2309 return re.search(r"\A[\w]\:", filepath) is not None
2310
2311def 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
2322def ntToPosixSlashes(filepath):
2323 """

Callers 5

webInitMethod · 0.90
delRemoteFileMethod · 0.90
stackedWriteFileMethod · 0.90
getManualDirectoriesFunction · 0.85
parseFilePathsFunction · 0.85

Calls 1

replaceMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…