PowerTCP FTP for .NET
Combine(String,String) Method



The first path to combine.
The second path to combine.
Combines two strings into a Unix path.
Syntax
Public Overloads Shared Function Combine( _
   ByVal unixPath1 As String, _
   ByVal unixPath2 As String _
) As String
Dim unixPath1 As String
Dim unixPath2 As String
Dim value As String
 
value = UnixPath.Combine(unixPath1, unixPath2)
public static string Combine( 
   string unixPath1,
   string unixPath2
)
public:
static String^ Combine( 
   String^ unixPath1,
   String^ unixPath2
) 

Parameters

unixPath1
The first path to combine.
unixPath2
The second path to combine.

Return Value

The combined paths. If one of the specified paths is a zero-length string, this method returns the other path. If unixPath2 contains an absolute path, this method returns unixPath2.
Exceptions
ExceptionDescription
System.ArgumentNullExceptionunixPath1 or unixPath2 is null.
System.ArgumentExceptionunixPath1 or unixPath2 contains a Unix filesystem-illegal character, NUL.
Remarks

If unixPath1 does not end with UnixDirectorySeparatorChar, it is appended to unixPath1 before concatenation.

If unixPath2 is a relative path (unixPath2 does not start with UnixDirectorySeparatorChar), the result is a concatenation of the two paths, with an intervening separator character. If unixPath2 is an absolute path, unixPath2 is returned.

White space is not parsed. Therefore, if unixPath2 starts with white space (for example, " /file.txt "), the Combine method appends unixPath2 to unixPath1 instead of returning only unixPath2.

See Also

Reference

UnixPath Class
UnixPath Members
Overload List


PowerTCP FTP for .NET Documentation Version 6.1
© 2023 Dart Communications. All Rights Reserved.
Send comments on this topic