I have the code below :
private Path zipFiles(Path directory){ Files.list(directory).filter(Files::isDirectory) .forEach(addToZipFi