dired-maybe-insert-subdir

dired-maybe-insert-subdir is an interactive autoloaded Lisp function in `dired-aux.el'.


(dired-maybe-insert-subdir DIRNAME &optional SWITCHES NO-ERROR-IF-NOT-DIR-P)

Insert this subdirectory into the same dired buffer.
If it is already present, just move to it (type M-x dired-do-redisplay to refresh),
else inserts it at its natural place (as `ls -lR' would have done).
With a prefix arg, you may edit the ls switches used for this listing.
You can add `R' to the switches to expand the whole tree starting at
this subdirectory.
This function takes some pains to conform to `ls -lR' output.

Dired remembers switches specified with a prefix arg, so that reverting
the buffer will not reset them. However, using `dired-undo' to re-insert
or delete subdirectories can bypass this machinery. Hence, you sometimes
may have to reset some subdirectory switches after a `dired-undo'.
You can reset all subdirectory switches to the default using
M-x dired-reset-subdir-switches.
See Info node `(emacs)Subdir switches' for more details.