Iterate over the files of a directory