'Roll up the sidewalks'
In the US, this phrase occurs when a writer describes a town's business district shutting down for the night. Often, there's a certain quaintness meant: it may be used more to describe a town or area where everything shuts down early. I recently heard "fold up the sidewalks" and now I wonder: what IS the phrase, and what is its basis and history? Thanks!