Green’s Dictionary of Slang

barn n.2

also barn door

(US) the trouser fly.

[US]S. Bellow Augie March (1996) 36: Tell you? Tell you to keep your barn buttoned.
[US]T. Berger Crazy in Berlin 187: I thought what a dirty little turd I was: with your ass about to be blown off and you button the barn door.
[US] in DARE.
[US](con. 1969–70) D. Bodey F.N.G. (1988) 101: The buttons of my barn door have popped off. It feels good.

In phrases

the barn door is open (also stable door...)

(orig. US) a phr. used to warn a man that his trouser fly is undone; cit. 1970 is an extrapolation from main phr.

Ruppenthal Collection n.p.: KS, Barn door open—said of little children. To have the rear of lower garments hanging down as if unbuttoned, etc [DARE].
[US]D. Lebofsky Lex. of Phila. Metropolitan Area n.p.: Close the stable or the horse’ll get out, who died--your flag is at half-mast, your lunch box is open, flies cause disease--keep yours closed, what do birds do?-- your fly is open.
[UK]K. Bonfiglioli letter in Bonfiglioli Mortdecai ABC (2001) 387: A charming Mormon in the lobby of the Holiday Inn, Miami, murmured to me, ‘Par’m me, sir, but your barn-door is open’.
[UK]J. Morton Lowspeak.
Moment Ministries 🌐 Every man has fly stories. Some have phobias. Everyone knows what it means when someone says, ‘Your barn door is open’.
Fendexis 🌐 Granny nudged me as we entered the elevator … ‘Your zipper is open honey’ she said under her voice and we moved to the back. I turned around, looked down, and sure enough, my barn door was wide open!
Peter’s peaking out of the barn

a warning to a man that his fly is open.

Cadywoompus Band 🌐 Best way to tell someone that their fly is down? Peter’s peaking out of the Barn.