Is the word "floor" used in the same way in the following two sentences?

The floor of a cave served the refugees as a home.

They needed rugs to cover the bare floors.
different meanings