tpathdiriterator.md 962 B


id: tpathdiriterator title: TPathDirIterator

sidebar_label: TPathDirIterator

Iterator over the direct children of a directory TPath.

This iterator enumerates entries in a directory using ReadDir and NextFile and yields a TPath for each child.

The iterator holds an open directory handle while iterating. It should be closed when no longer needed, either explicitly via Close or automatically using a Using block.

Functions

Function Create:TPathDirIterator(baseDir:TPath, skipDots:Int = True)

Creates a directory iterator for baseDir.

If baseDir is not a directory or cannot be opened, the iterator yields no items.