In any action for divorce, for a separation, for an annulment or to declare the nullity of a void marriage, the court may (1) determine any question as to the title to property arising between the parties, and (2) make such direction, between the parties, concerning the possession of property, as in the court's discretion justice requires having regard to the circumstances of the case and of the respective parties. Such direction may be made in the final judgment, or by one or more orders from time to time before or subsequent to final judgment, or by both such order or orders and final judgment. Where the title to real property is affected, a copy of such judgment, order or decree, duly certified by the clerk of the court wherein said judgement was rendered, shall be recorded in the office of the recording officer of the county in which such property is situated, as provided by sectionof the real property law.
N.Y. Dom. Rel. Law § 234