Guidewire Interview Question

Listing all the files within a directory with only one loop