Maybe `closeAllDocuments` would be a better name for this function, since this is what it does.