delete listdir func