applyDir