Yes, the moment you file for bankruptcy an automatic stay goes into effect on the property in question. This prohibits the creditor from continuing the foreclosure sale. As long as the home hasn’t already been sold, bankruptcy can halt the foreclosure process.