Click or drag to resize

ExtensionsFileIOExistsAsync Method

Determines whether the specified file exists.

Namespace:  Cauldron
Assembly:  Cauldron (in Cauldron.dll) Version: 3.2.0.1 (3.2.0.1)
Syntax
C#
public static Task<bool> ExistsAsync(
	this DirectoryInfo folder,
	string filename
)

Parameters

folder
Type: System.IODirectoryInfo
The folder where the file resides
filename
Type: SystemString
The filename of the file to check.

Return Value

Type: TaskBoolean
When this method completes, it returns true if the file exists, otherwise false. If the caller does not have sufficient permissions to read the specified file, no exception is thrown and the method returns false regardless of the existence of path.

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