Click or drag to resize

PathSelectionListGetFileEnumerator Method

Returns an Enumerator to use the PathSelectionList in a foreach statement.

Namespace:  Jam.Shell
Assembly:  ShellBrowser.Winforms (in ShellBrowser.Winforms.dll) Version: 6.3.1
Syntax
public IEnumerable<string> GetFileEnumerator()

Return Value

Type: IEnumerableString
Returns all files for the selected paths.
Remarks
The Enumerator will only return files in the list, not directories or drives. If the PathSelectionList contains a Drive or a large directory using GetFileEnumerator might be slow, because all Files contained in the Directories are iterated. As compared to GetFileEnumerator iterating the PathSelectionList directly will return a unified list consisting of folders and files.

 

If folder "c:\Windows" is added to a PathSelectionList GetFileEnumerator will return all files in Windows and its subdirectories. Iterating it directly will return "c:\Windows\*".
Examples
IEnumerator<string> fileEnum =
    shellControlConnector1.SelectionList.GetFileEnumerator();
while (fileEnum.MoveNext())
{
    //do something with fileEnum.Current;
}
or
foreach (string file in selectionList.getFileEnumerator() {
    //do something with file
}
See Also