Returns the names of files in the collection that match the specified search pattern.

Namespace:  Rebex.IO
Assembly:  Rebex.Common (in Rebex.Common.dll)

Syntax

Visual Basic
Public Function GetFiles ( _
	searchPattern As String _
) As String()
C#
public string[] GetFiles(
	string searchPattern
)

Parameters

searchPattern
Type: System..::..String
The search string to match the items against.

Return Value

A String array containing the names of files in the specified directory that match the specified search pattern.

Remarks

The following wildcard specifiers are permitted in searchPattern:
* - Zero or more characters.
? - Exactly one character.
Characters other than the wild card specifiers represent themselves. For example, the searchPattern string "*t" searches for all names in path ending with the letter "t". The searchPattern string "s*" searches for all names in path beginning with the letter "s".

The method works in two different modes (determined by UsePath property): Filenames without path are searched and returned. This mode is used by default for collections returned by GetList method.Filenames with path are searched and returned. This mode is used by default for collection returned by GetItems method.

Version Information

.NET Compact Framework

Supported in: 3.9, 3.5

See Also