Where one person transfers or bequeaths immovable property to another,—
(a) if an easement in other immovable property of the transferor or testator is necessary for enjoying the subject of the transfer or bequest, the transferee or legatee shall be entitled to such easement; or
(b) if such an easement is apparent and continuous and necessary for enjoying the said subject as it was enjoyed when the transfer or bequest took effect, the transferee or legatee shall, unless a different intention is expressed or necessarily implied, be entitled to such easement;
(c) if an easement in the subject of the transfer or bequest is necessary for enjoying other immovable property of the transferor or testator, the transferor or the legal representative of the testator shall be entitled to such easement; or
(d) if such an easement is apparent and continuous and necessary for enjoying the said property as it was enjoyed when the transfer or bequest took effect, the transferor, or the legal representative of the testator, shall, unless a different intention is expressed or necessarily implied, be entitled to such easement.
Where a partition is made of the joint property of several persons,—
(e) if an easement over the share of one of them is necessary for enjoying the share of another of them, the latter shall be entitled to such easement, or
(f) if such an easement is apparent and continuous and necessary for enjoying the share of the latter as it was enjoyed when the partition took effect, he shall, unless a different intention is expressed or necessarily implied, be entitled to such easement.
The easements mentioned in this section, clauses (a), (c) and (e), are called easements of necessity.
Where immovable property passes by operation of law, the persons from and to whom it so passes are, for the purpose of this section, to be deemed, respectively, the transferor and transferee.