How to iterate over entries in a directory.