RemotePath.Combine Method

Combines strings into a remote/*nix path.

This method exists only in the latest beta release. In previous versions there is an equivalent method RemotePath.CombinePaths.


public static string Combine(string path1, string path2)
Public Shared Function Combine(path1 As String, path2 As String) As String


Name Description
string path1 The first path to combine.
string path2 The second path to combine.

Return Value

The combined paths.


Exception Condition
ArgumentNullException Some of the arguments is null.


Concatenates path1 with path2, interleaving them with a slash (/), unless the path1 already ends with a slash.

If one of the paths in empty, returns the other path.

If the path2 is an absolute path (starts with a slash), returns path2.

The method is an equivalent of the standard Path.Combine method for remote/*nix paths.


Real-Life Example

Last modified: by martin