5.2.5 processDirectory