Implement getFilesInDirectory.