It is nearly ten o'clock at night. The weather is rainy and blustery. A uniformed policeman is walking along the sidewalk trying the doors of all the closed shops to make sure they are locked. The streets are dark because this is still the era when transportation depended on horses and most lighting was provided by candles, lamps, and gas. O. Henry is cleverly introducing one of the main characters but making him appear to be a typical New York beat cop who is just patrolling his familiar neighborhood. The fact is that he is really Jimmy Wells and intends to meet his old friend Bob at ten o'clock.
Bob is standing inside the recessed entryway to a closed hardware store to get out of the rain. Twenty years ago, the two men had made an appointment to meet there on that night at ten o'clock. But they couldn't foresee that the restaurant where they said goodbye and made their appointment would be torn down. That explains why Bob is standing in front of a closed hardware store instead of meeting Jimmy at a more appropriate rendezvous such as a saloon or a restaurant. They have no way of changing their meeting place because they haven't communicated for many years.
Bob is a wanted man. He must feel uncomfortable standing in a place where he naturally looks suspicious. He certainly doesn't want to attract the attention of any cop, but he has to stay there to meet Jimmy. And he has to stand inside the entryway to get out of the rain and also because he intends to light a cigar. So when a uniformed policeman appears right in front of him, Bob naturally assumes he is under suspicion and turns on the charm that has earned him the nickname of 'Silky' Bob. He doesn't give Jimmy a chance to identify himself or to say a word. And then before Jimmy does have a chance to speak, Bob lights his cigar and reveals that he is the man wanted by the Chicago police. Consequently, Jimmy decides not to identify himself but lets Bob do most of the talking.
This is O. Henry's polished professional way of conveying a great deal of exposition to the reader in the form of dialogue. If the author presented the same information in the form of straight third-person anonymous-narrator expository prose, he could be accused of deliberately misleading the reader. After all, if the narrator knows everything, why wouldn't he explain that the cop is really Jimmy Wells? The opening of "Twenty Years" is handled in an objective, dramatic fashion to mislead the reader without "cheating," so to speak: without doing so too flagrantly. There is none of the commentary and philosophizing in "Twenty Years" that is found in many of O. Henry's other stories, such as "The Last Leaf," "The Gift of the Magi," and "The Furnished Room." O. Henry's versatility and buoyant inspiration show that he was a real genius.