Here you can find the source of deleteFiles(File docFolder)
Parameter | Description |
---|---|
docFolder | a parameter |
private static void deleteFiles(File docFolder)
//package com.java2s; // %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt import java.io.File; public class Main { /**/*w w w. j a va 2 s. c o m*/ * ftang Comment method "deleteFiles". * * @param docFolder */ private static void deleteFiles(File docFolder) { if (docFolder.listFiles() == null || docFolder.listFiles().length == 0) { docFolder.delete(); } else { for (File file : docFolder.listFiles()) { if (file.isFile()) { file.delete(); } else if (file.isDirectory()) { deleteFiles(file); } } } } }