Implemented walkDirectory.