NAnt SDK Documentation - v0.92 |

# FileUtils.CombinePaths Method

Combines two path strings.

[Visual Basic]
Public Shared Function CombinePaths( _
ByVal path1 As String, _
ByVal path2 As String _
) As String
[C#]
public static string CombinePaths(
string path1,
string path2
);

#### Parameters

path1
  The first path.
path2
  The second path.

#### Return Value

A string containing the combined paths. If one of the specified paths is a zero-length string, this method returns the other path. If path2 contains an absolute path, this method returns path2.

#### Remarks

On *nix, processing is delegated to Combine.

On Windows, this method normalized the paths to avoid running into the 260 character limit of a path and converts forward slashes in both path1 and path2 to the platform's directory separator character.

#### See Also

FileUtils Class | NAnt.Core.Util Namespace