introduce iterate_dir() and dir_context