opendir might be better.