The path portion of a location, without the file itself. Where rather than what.
A modern compound of directus (Latin, kept straight, clipped to dir for a directory) and nama (Old English, name, from a root meaning to know or call); the location without the thing located.
The path portion of a location, kept apart from the file it leads to. Dirname answers where something lives, never what it is.