Here you can find the source of deleteFiles(File file)
Parameter | Description |
---|---|
file | a parameter |
private static void deleteFiles(File file)
//package com.java2s; //License from project: Open Source License import java.io.File; import java.util.stream.Stream; public class Main { /**/*from w w w. j ava 2s . c om*/ * Remove com recursividade. * * @param file */ private static void deleteFiles(File file) { File[] listFiles = file.listFiles(); Stream.of(listFiles).parallel().forEach(f -> { if (f.isDirectory()) { deleteFiles(f); } f.delete(); }); } }