Click or drag to resize

ExtensionsDirectoryInfoGetUniqueDirectoryName Method

Checks if the directory name exist. If the directory already exists, an indexer will be added to the directory name to make it unique.

Namespace:  Cauldron
Assembly:  Cauldron (in Cauldron.dll) Version: 3.2.0.1 (3.2.0.1)
Syntax
C#
public static DirectoryInfo GetUniqueDirectoryName(
	this DirectoryInfo directory
)

Parameters

directory
Type: System.IODirectoryInfo
The directory to check.

Return Value

Type: DirectoryInfo
A unique and valid path and filename.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type DirectoryInfo. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also