delete scandir function