Click or drag to resize

ExtensionsFileInfoGetUniqueFilename Method

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

Namespace:  Cauldron
Assembly:  Cauldron (in Cauldron.dll) Version: 3.2.0.2
Syntax
public static FileInfo GetUniqueFilename(
	this FileInfo file
)

Parameters

file
Type: System.IOFileInfo
The file to check.

Return Value

Type: FileInfo
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 FileInfo. 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