IsolatedStorageFile.GetDirectoryNames Method

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Enumerates the directories in the root of an isolated store.

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

Syntax

'Declaration
Public Function GetDirectoryNames As String()
public string[] GetDirectoryNames()

Return Value

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

Exceptions

Exception Condition
IsolatedStorageException

The isolated store has been removed.

-or-

Isolated storage is disabled.

ObjectDisposedException

The isolated store has been disposed.

Remarks

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

Examples

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

Dim directoriesInTheRoot() As String = store.GetDirectoryNames
string[] directoriesInTheRoot = store.GetDirectoryNames();

Version Information

Silverlight

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

Platforms

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