Get all files in a directory

Namespace: Contracts.IO
Assembly: Contracts (in Contracts.dll)

Public Shared Function GetFileInfos( _ 
ByVal path As String, _ 
ByVal extension As String, _ 
ByVal option As SearchOption
) As FileInfo()
This language is not supported or no code example is available.
public static FileInfo[] GetFileInfos( 
string path
string extension
SearchOption option 
)
This language is not supported or no code example is available.
public:  
static array< FileInfo^ >^ GetFileInfos( 
String^ path
String^ extension
SearchOption option 
)
This language is not supported or no code example is available.
public static function GetFileInfos( 
path : String
extension : String
option : SearchOption 
) : FileInfo[];
This language is not supported or no code example is available.

Parameters

path
Type: string

<default>

extension
Type: string

<default>

option
Type: SearchOption

<default>

Return Value

Type: FileInfo[]

.NET Framework

Supported in: 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1