dired-current-directory

dired-current-directory is a compiled Lisp function in `dired.el'.

(dired-current-directory &optional LOCALP)

Return the name of the subdirectory to which this line belongs.
This returns a string with trailing slash, like `default-directory'.
Optional argument means return a file name relative to `default-directory'.