IPathFileEnumeratorFactory.GetEnumerator Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
GetEnumerator(IReadOnlyList<String>, Boolean, PathFilter) |
Get an enumerator for all files in defined location(s). |
GetEnumerator(IReadOnlyList<String>, Boolean, PathFilter, CancellationToken) |
Get an enumerator for all files in defined location(s). |
GetEnumerator(IReadOnlyList<String>, Boolean, PathFilter)
Get an enumerator for all files in defined location(s).
public Microsoft.VisualStudio.Shell.Internal.FileEnumerationService.IFileEntityAsyncEnumerator GetEnumerator (System.Collections.Generic.IReadOnlyList<string> paths, bool includeSubfolders = true, Microsoft.VisualStudio.Shell.Internal.FileEnumerationService.PathFilter filter = default);
abstract member GetEnumerator : System.Collections.Generic.IReadOnlyList<string> * bool * Microsoft.VisualStudio.Shell.Internal.FileEnumerationService.PathFilter -> Microsoft.VisualStudio.Shell.Internal.FileEnumerationService.IFileEntityAsyncEnumerator
Public Function GetEnumerator (paths As IReadOnlyList(Of String), Optional includeSubfolders As Boolean = true, Optional filter As PathFilter = Nothing) As IFileEntityAsyncEnumerator
Parameters
- paths
- IReadOnlyList<String>
Defines a list of absolute folder path where the files must be retrieved.
- includeSubfolders
- Boolean
(optional) Defines whether the subfolders must be included or not. By default, this value is True
.
- filter
- PathFilter
(optional) Additional filter to apply.
Returns
Returns an enumerator to get the next discovered file asynchronously.
Remarks
This enumerator never gets invalidated.
Applies to
GetEnumerator(IReadOnlyList<String>, Boolean, PathFilter, CancellationToken)
Get an enumerator for all files in defined location(s).
public Microsoft.VisualStudio.Shell.Internal.FileEnumerationService.IFileEntityAsyncEnumerator GetEnumerator (System.Collections.Generic.IReadOnlyList<string> paths, bool includeSubfolders = true, Microsoft.VisualStudio.Shell.Internal.FileEnumerationService.PathFilter filter = default, System.Threading.CancellationToken cancellationToken = default);
abstract member GetEnumerator : System.Collections.Generic.IReadOnlyList<string> * bool * Microsoft.VisualStudio.Shell.Internal.FileEnumerationService.PathFilter * System.Threading.CancellationToken -> Microsoft.VisualStudio.Shell.Internal.FileEnumerationService.IFileEntityAsyncEnumerator
Public Function GetEnumerator (paths As IReadOnlyList(Of String), Optional includeSubfolders As Boolean = true, Optional filter As PathFilter = Nothing, Optional cancellationToken As CancellationToken = Nothing) As IFileEntityAsyncEnumerator
Parameters
- paths
- IReadOnlyList<String>
Defines a list of absolute folder path where the files must be retrieved.
- includeSubfolders
- Boolean
(optional) Defines whether the subfolders must be included or not. By default, this value is True
.
- filter
- PathFilter
(optional) Additional filter to apply.
- cancellationToken
- CancellationToken
(optional) Cancellation token that can cancel IsInEnumerationAsync(FileEntity) and MoveNextAsync().
Returns
Returns an enumerator to get the next discovered file asynchronously.
Remarks
This enumerator never gets invalidated.