No person shall demolish any building or structure or part thereof, when such building, structure or part is within six feet of a street line, or is twelve feet or more in height, or is within six feet of an area which the owner or lessee provides and invites the public to use as it would a public way, or when the distance between such street line or area and such building, structure or part is more than six feet but less than one-half the total height of the object to be demolished, without causing to be erected and maintained a sidewalk shed meeting the requirements of this section. Such shed shall: (1) Extend for the full length of the building on all street fronts; (2) exist for the duration of the demolition operations; (3) be not less than four feet wide and six feet eight inches high in the clear; (4) be watertight, and (5) be adequately lighted for pedestrian traffic. When the roof of any such shed is used for the storage of material or for the performance of work of any kind, adequate railings, not less than three feet high, and solid toe boards, not less than six inches high, shall be affixed along the open sides and ends of such roofs. The roofs of such sheds shall be of sufficient strength and stability safely to sustain the weight of materials that may be placed thereon and the shocks incidental to the handling, preparation for use, trucking or delivery of materials. The requirements of this section, as they relate to street lines, shall not apply in any case in which all such streets are officially closed to pedestrian and vehicular traffic. The building official may waive any of the requirements of this section, if the object to be demolished is more than forty feet from any street line or area used as a public way and its demolition is accomplished by the removal of one story at a time.