Click or drag to resize

ExtensionsDirectoryInfoGetFileAsync Method

Gets the file with the specified name from the current folder.

Namespace:  Cauldron
Assembly:  Cauldron (in Cauldron.dll) Version: 3.2.0.1 (3.2.0.1)
Syntax
C#
public static Task<FileInfo> GetFileAsync(
	this DirectoryInfo directoryInfo,
	string name
)

Parameters

directoryInfo
Type: System.IODirectoryInfo
The DirectoryInfo representing the current folder
name
Type: SystemString
The name (or path relative to the current folder) of the file to get.

Return Value

Type: TaskFileInfo
When this method completes successfully, it returns a FileInfo that represents the specified file.

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