Get all files in a directory

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

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

.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