Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
elif toType == PathConvType.WIN:
return __Lin2Win__(input)
elif toType == PathConvType.LINUX:
return input
elif toType == PathConvType.WINDOUBLE:
return __Win2Dwin__(__Lin2Win__(input))
else:
raise ValueError("ERROR: Invalid Conversion Type "+toType)
elif re.match(r'[A-Za-z]:\\\\', input) is not None: # Windows Path /w Double Dashline
if toType == PathConvType.AUTO:
return __DWin2Lin__(input)
elif toType == PathConvType.LINUX:
return __DWin2Lin__(input)
elif toType == PathConvType.WIN:
return __Lin2Win__(__DWin2Lin__(input))
elif toType == PathConvType.WINDOUBLE:
return input
else:
raise ValueError("ERROR: Invalid Conversion Type "+toType)
elif re.match(r'[A-Za-z]:', input) is not None: # Windows Path
if toType == PathConvType.AUTO:
return __DWin2Lin__(__Win2Dwin__(input))
elif toType == PathConvType.LINUX:
return __DWin2Lin__(__Win2Dwin__(input))
elif toType == PathConvType.WIN:
return input
elif toType == PathConvType.WINDOUBLE:
return __Win2Dwin__(input)
else:
raise ValueError("Invalid Conversion Type "+toType)
else:
raise ValueError("Invalid Path "+input)
Parameters
----------
input : str
the string of the original path.
Returns
-------
string of Windows Path /w Double Style path.
Raises
------
ValueError
An error occurred when the input is invalid.
"""
return to(input, PathConvType.WINDOUBLE)