support ignore/replace option in dir