remove directory by rmdir function