다음을 통해 공유


IDirectoryCache.EnumerateDirectories<TResult> Method

Definition

Enumerates subdirectories in the given directory only (non-recursively).

public:
generic <typename TResult>
 System::Collections::Generic::IEnumerable<TResult> ^ EnumerateDirectories(System::String ^ path, System::String ^ pattern, Microsoft::Build::FileSystem::FindPredicate ^ predicate, Microsoft::Build::FileSystem::FindTransform<TResult> ^ transform);
public System.Collections.Generic.IEnumerable<TResult> EnumerateDirectories<TResult> (string path, string pattern, Microsoft.Build.FileSystem.FindPredicate predicate, Microsoft.Build.FileSystem.FindTransform<TResult> transform);
abstract member EnumerateDirectories : string * string * Microsoft.Build.FileSystem.FindPredicate * Microsoft.Build.FileSystem.FindTransform<'Result> -> seq<'Result>
Public Function EnumerateDirectories(Of TResult) (path As String, pattern As String, predicate As FindPredicate, transform As FindTransform(Of TResult)) As IEnumerable(Of TResult)

Type Parameters

TResult

The desired return type.

Parameters

path
String

The directory to enumerate, specified as a full normalized path.

pattern
String

A search pattern supported by the platform which is guaranteed to return a superset of relevant directories.

predicate
FindPredicate

A predicate to test whether a directory should be included.

transform
FindTransform<TResult>

A transform from ReadOnlySpan<char> to TResult.

Returns

IEnumerable<TResult>

Remarks

The pattern parameter may match more direcories than what the caller is interested in. In other words, predicate can return false even if the implementation enumerates only directories whose names match the pattern. The implementation is free to ignore the pattern and call the predicate for all directories on the given path.

Applies to