In the event that the mayor, as an agent of the State, refuses or neglects to perform any of the acts required of him by law, the representative of the State in the department may, after having requested him to do so, perform them ex officio by himself or by a special delegate.