Share via


DirectoryInfo.EnumerateFileSystemInfos Method

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

When it is called by trusted applications, returns an enumerable collection of file system information in the current directory.

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

Syntax

'Declaration
Public Function EnumerateFileSystemInfos As IEnumerable(Of FileSystemInfo)
public IEnumerable<FileSystemInfo> EnumerateFileSystemInfos()

Return Value

Type: System.Collections.Generic.IEnumerable<FileSystemInfo>
An enumerable collection of file system information in the current directory.

Exceptions

Exception Condition
DirectoryNotFoundException

The path encapsulated in the FileSystemInfo object is invalid (for example, it is on an unmapped drive).

SecurityException

The caller does not have the required permission.

Version Information

Silverlight

Supported in: 5, 4

Platforms

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