code: private void recursivelyCheckAndDeleteFiles(final App app, final FailedToDeleteDataImpl result, final AbstractFile toDelete, final Boolean continueOnFailure) throws FrameworkException {
  
  		if (toDelete != null) {
  
  			final Principal owner = toDelete.getOwnerNode();
  			if (owner == null || owner.isGranted(Permission.delete, securityContext)) {
  
  				app.delete(toDelete);
  
  				if (toDelete instanceof Folder) {
  
  					final Folder folderToDelete = (Folder)toDelete;
  
  					for (final AbstractFile child : folderToDelete.getChildren()) {
  
  						recursivelyCheckAndDeleteFiles(app, result, child, continueOnFailure);
  					}
  				}
  
  			} else {
  
  				if (continueOnFailure) {
  
  					result.getIds().add(toDelete.getUuid());
  
  				} else {
  
  					throw new CmisPermissionDeniedException("Cannot delete object with ID " + toDelete.getUuid());
  				}
  			}
  		}
  	}
docs: ----- private methods -----