PowerTCP SSH and SFTP for .NET
ConvertToWindows(String,String,String) Method




A relative or absolute Unix path.
The root to remove from the beginning of unixPath.
The root to prepend to the Windows path.
Converts a Unix path to a Windows path, replacing unixRoot with windowsRoot, and any Windows filesystem-illegal characters with underscores.
Syntax
'Declaration
 
Public Overloads Shared Function ConvertToWindows( _
   ByVal unixPath As String, _
   ByVal unixRoot As String, _
   ByVal windowsRoot As String _
) As String
'Usage
 
Dim unixPath As String
Dim unixRoot As String
Dim windowsRoot As String
Dim value As String
 
value = UnixPath.ConvertToWindows(unixPath, unixRoot, windowsRoot)
public static string ConvertToWindows( 
   string unixPath,
   string unixRoot,
   string windowsRoot
)
public: static string* ConvertToWindows( 
   string* unixPath,
   string* unixRoot,
   string* windowsRoot
) 
public:
static String^ ConvertToWindows( 
   String^ unixPath,
   String^ unixRoot,
   String^ windowsRoot
) 

Parameters

unixPath
A relative or absolute Unix path.
unixRoot
The root to remove from the beginning of unixPath.
windowsRoot
The root to prepend to the Windows path.

Return Value

A sanitized Windows path equivalent to unixPath under windowsRoot.
Exceptions
ExceptionDescription
System.ArgumentNullExceptionunixPath, unixRoot or windowsRoot is null.
Remarks
If windowsRoot is an empty string, returns a relative path.
See Also

Reference

UnixPath Class
UnixPath Members
Overload List


PowerTCP SSH and SFTP for .NET Documentation Version 7.0
© 2023 Dart Communications. All Rights Reserved.
Send comments on this topic