Walk a directory/Non-recursively: Difference between revisions

Added a general comment.
m (→‎{{header|Phix}}: added syntax colouring the hard way, phix/basics)
(Added a general comment.)
Line 1,174:
 
=={{header|Nim}}==
The “os” standard module provides several iterators to retrieve files or directories matching a pattern: <code>walkPattern</code> to retrieve files and directories, <code>walkFiles</code> to retrieve only files and <code>walkDirs</code> to retrieve only directories. The pattern is OS dependent but at least the <code>*.ext</code> notation is supported.
 
And there is the powerful <code>walkDir</code> to list the content of a directory specified by its name (without pattern).
Here is an example with <code>walkFiles</code> and a pattern:
 
<lang nim>import os
 
Anonymous user