use Filerator;

for dir in walkdirs("subdir") {
  writeln("dir ", dir, " contains:");
  for file in glob(dir+"/*") do
    writeln("  ", file);
}


Fix nondeterministic output from walkdir() by requesting sorted output
use Filerator;

for dir in walkdirs("subdir", sort=true) {
  writeln("dir ", dir, " contains:");
  for file in glob(dir+"/*") do
    writeln("  ", file);
}