At the beginning of the book a CLOSE is stated as being an entry to a tenement, also possibly offering access at the back of the building.
That's a slightly inadequate definition, because it begs the question of what a tenement is!
Originally, a tenement was simply a plot of land - such as one of the strips of land leading off at right angles to the street. Later, as the tenement land became built over, it also acquired the meaning of a building with separate housing for several households, all accessed from a common stair.
There could be, and in the case of Edinburgh there usually were, many buildings in a close, and the access would have given access to all of the buildings in that close, not just 'the building'.
I suspect the writer of that definition is thinking of a tenement in terms of a single large building for multiple occupancy, with a passageway at ground level from the street to a piece of ground behind the building where there is a small garden, or more usually a drying green.