If the bankruptcy is filed after the property is sold at the trustee sale it should not interrupt the transfer since title to the property has already passed with the sale.
As for the eviction, the bankruptcy should not typically afford the occupant protection. While a tenant who files bankruptcy may be able to delay an eviction under certain circumstances by continuing to pay rent, those rules apply to a tenant under a lease. A holdover occupant following a trustee sale is not a rent paying tenant under a lease so that protection may not be applicable.
That said, we recommend that you consult with an attorney if confronted with this situation as circumstances can vary and the state court overseeing the eviction will likely need guidance concerning the non-applicability of the bankruptcy stay.