boolean (@NotNull File file) { File tempFileNameForDeletion = findSequentNonexistentFile(file.getParentFile(), file.getName(), ""); boolean success = file.renameTo(tempFileNameForDeletion); return delete(success ? tempFileNameForDeletion : file); }