DirectoryInfo.GetFiles Method (String)
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Returns a file list from the current directory matching the given searchPattern.
Assembly: mscorlib (in mscorlib.dll)
Parameters
- searchPattern
- Type: System.String
The search string, such as "*.txt".
| Exception | Condition |
|---|---|
| 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. |
Show: