Check the updated docs for "The Standard File Package" which is the UI for selecting files. Page 3-4 (all page numbers has section number). It has full description of the UI, keyboard shortcuts, data structures and example code. It even includes how to customize the dialog.
There is 69 pages of documentation of just how to select a file!
https://vintageapple.org/inside_r/pdf/Files_1992.pdf
Apple no longer understands that good docs is a competitive advantage. The web has such good docs at developer.mozilla.org that it is a world apart.