Show / Hide Table of Contents
Improve this Doc

Class FastDirectoryEnumerator

A fast enumerator of files in a directory. Use this if you need to get attributes for all files in a directory.

Inheritance
System.Object
FastDirectoryEnumerator
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace:uFrame.Editor.Core
Assembly:cs.temp.dll.dll
Syntax
public class FastDirectoryEnumerator
Remarks

This enumerator is substantially faster than using and then creating a new FileInfo object for each path. Use this version when you will need to look at the attibutes of each file returned (for example, you need to check each file in a directory to see if it was modified after a specific date).

Methods

| Improve this Doc

EnumerateFiles(String)

Gets FileData for all the files in a directory.

Declaration
public static IEnumerable<FileData> EnumerateFiles(string path)
Parameters
Type Name Description
System.String path

The path to search.

Returns
Type Description
IEnumerable<FileData>

An object that implements and allows you to enumerate the files in the given directory.

Exceptions
Type Condition
System.ArgumentNullException

path is a null reference (Nothing in VB)

| Improve this Doc

EnumerateFiles(String, String)

Gets FileData for all the files in a directory that match a specific filter.

Declaration
public static IEnumerable<FileData> EnumerateFiles(string path, string searchPattern)
Parameters
Type Name Description
System.String path

The path to search.

System.String searchPattern

The search string to match against files in the path.

Returns
Type Description
IEnumerable<FileData>

An object that implements and allows you to enumerate the files in the given directory.

Exceptions
Type Condition
System.ArgumentNullException

path is a null reference (Nothing in VB)

System.ArgumentNullException

filter is a null reference (Nothing in VB)

| Improve this Doc

EnumerateFiles(String, String, SearchOption)

Gets FileData for all the files in a directory that match a specific filter, optionally including all sub directories.

Declaration
public static IEnumerable<FileData> EnumerateFiles(string path, string searchPattern, SearchOption searchOption)
Parameters
Type Name Description
System.String path

The path to search.

System.String searchPattern

The search string to match against files in the path.

SearchOption searchOption

One of the SearchOption values that specifies whether the search operation should include all subdirectories or only the current directory.

Returns
Type Description
IEnumerable<FileData>

An object that implements and allows you to enumerate the files in the given directory.

Exceptions
Type Condition
System.ArgumentNullException

path is a null reference (Nothing in VB)

System.ArgumentNullException

filter is a null reference (Nothing in VB)

System.ArgumentOutOfRangeException

searchOption is not one of the valid values of the

System.IO.SearchOption enumeration.

| Improve this Doc

GetFiles(String, String, SearchOption)

Gets FileData for all the files in a directory that match a specific filter.

Declaration
public static FileData[] GetFiles(string path, string searchPattern, SearchOption searchOption)
Parameters
Type Name Description
System.String path

The path to search.

System.String searchPattern

The search string to match against files in the path.

SearchOption searchOption
Returns
Type Description
FileData[]

An object that implements and allows you to enumerate the files in the given directory.

Exceptions
Type Condition
System.ArgumentNullException

path is a null reference (Nothing in VB)

System.ArgumentNullException

filter is a null reference (Nothing in VB)

Back to top Copyright © 2015-2016 Microsoft
Generated by DocFX