System.IO.IsolatedStorage.IsolatedStorageFile.GetFileNames Method

Gets the file names that match a search pattern.

Syntax

public string[] GetFileNames (string searchPattern)

Parameters

searchPattern
A search pattern. Both single-character ("?") and multi-character ("*") wildcards are supported.

Returns

An array of relative paths of files in the isolated storage scope that match searchPattern. A zero-length array specifies that there are no files that match.

Remarks

The searchPattern "Project\Data*.txt" will give all ".txt" files beginning with Data in the Project directory of the isolated storage scope. For complete description of search pattern strings, see System.IO.Directory.

For information about how to find directory names, see the IsolatedStorageFile.GetDirectoryNames(string) method.

The [<topic://cpconfindingexistingfilesdirectories>] example demonstrates the use of the IsolatedStorageFile.GetFileNames(string) method.

Requirements

Namespace: System.IO.IsolatedStorage
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0