dired-query

dired-query is an autoloaded Lisp function in `dired-aux.el'.

(dired-query SYM PROMPT &rest ARGS)

Format PROMPT with ARGS, query user, and store the result in SYM.
The return value is either nil or t.

The user may type y or SPC to accept once; n or DEL to skip once;
! to accept this and subsequent queries; or q or ESC to decline
this and subsequent queries.

If SYM is already bound to a non-nil value, this function may
return automatically without querying the user. If SYM is !,
return t; if SYM is q or ESC, return nil.