Nit: missing `@param` for the new arg.

Also, I found the name slightly confusing.  Either way it's never really going to recurse... it's either going 1 level deep or 0.  Maybe a name like 'clearImmediateChildren' (inverting the true/false sense) would be clearer?  (Or 'preserveImmediateChildren' if we don't want to invert it?)