File.combine

Overview | Methods | This Package | All Packages

File.combine

Combines two file paths.

Syntax

public static String combine( String path1, String path2 )

Parameters

path1

The first path.

path2

The second path.

Return Value

Returns the combined path.

Remarks

If path2 does not include a root (for example, if path2 does not start with a backslash (\) or a drive specification), the result is a concatenation of the two paths, with an intervening backslash if required. If path2 includes a root, the result is path2. If either path1 or path2 is null, the result is a non-null string. If both path1 and path2 are null, the result is null.