This topic has not yet been rated - Rate this topic

DirectoryInfo.GetFiles Method (String)

April 12, 2014

Returns a file list from the current directory matching the given searchPattern.

Namespace:  System.IO
Assembly:  mscorlib (in mscorlib.dll)
'Declaration
Public Function GetFiles ( _
	searchPattern As String _
) As FileInfo()

Parameters

searchPattern
Type: System.String
The search string, such as "*.txt".

Return Value

Type: System.IO.FileInfo ()
An array of type FileInfo.
ExceptionCondition
ArgumentNullException

searchPattern is Nothing.

DirectoryNotFoundException

The path is invalid, such as being on an unmapped drive.

SecurityException

The caller does not have the required permission.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.