Path Controls

A path control shows the file-system path of a selected file or folder. For example, when you open a Finder window and choose View > Show Path Bar, a path control is displayed at the bottom of the window. It shows the path of the selected item, or the path of the window’s folder if nothing is selected. Path controls are intended for use in the body area of a window.

There are two styles of path control.

Standard. A linear list of path components that include the root disk, parent folders, and selected item. Each component is displayed as an icon and a name. If the components are too long to fit within the control, names between the first and last components are hidden. If the control is editable, the user can drag a new item onto the control to select the item and display its path in the control.

Pop Up. Similar in appearance to a pop-up button. Displays only the icon and name of the selected item. The user can click this item to display a menu containing the root disk, parent folders, and selected item. If the control is editable, this menu also includes a Choose command. The user can select Choose or drag a new item onto the control to select the item and display it in the control.

Use a path control in the window body, not the window frame. Path controls aren’t intended for use in toolbars or bottom bars. Note that the path control in Finder appears at the bottom of the window body, not in the bottom bar.

Use a path control only when it provides value to the user. Very few apps need to provide a file-system browsing experience like the Finder.

For developer guidance, see NSPathControl.