Path.iterDir

Path[] iterDir() const

Returns the directory contents as an array of Path.

This is an eager helper that materializes all entries into an array. See also: iterdir for a lazy range variant.

Returns

An array of Path objects for each entry in the directory.

Throws

If the path is not a directory.