GetFileNames Method
Collapse the table of content
Expand the table of content

IsolatedStorageFile.GetFileNames Method

Obtains the names of files in the root of an isolated store.

Namespace:  System.IO.IsolatedStorage
Assembly:  mscorlib (in mscorlib.dll)

public string[] GetFileNames()

Return Value

Type: System.String[]
An array of relative paths of files in the root of the isolated store. A zero-length array specifies that there are no files in the root.


The isolated store has been removed.


Isolated storage is disabled.


The isolated store has been disposed.

This method is equivalent to using the IsolatedStorageFile.GetFileNames(String) method with specified "*" for the search pattern.

The following example gets the names of files in the root directory. This example is part of a larger example provided for IsolatedStorageFile class.

string[] filesInTheRoot = store.GetFileNames();


Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Xbox 360, Windows Phone OS 7.0

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

© 2015 Microsoft