Here you can find the source of DelFile(String in_Path, ArrayList arrFileList)
Parameter | Description |
---|---|
in_Path | String |
arrFileList | ArrayList |
Parameter | Description |
---|---|
Exception | an exception |
public static void DelFile(String in_Path, ArrayList arrFileList) throws Exception
//package com.java2s; //License from project: Open Source License import java.io.File; import java.util.ArrayList; public class Main { public static void DelFile(String in_Path, ArrayList arrFileList) throws Exception { for (int i = 0; i < arrFileList.size(); i++) { String sFile = (String) arrFileList.get(i); File delFile = new File(sFile); delFile.delete();/*from w w w . j ava 2 s .c om*/ } } public static void DelFile(String in_FileName) throws Exception { File delFile = new File(in_FileName); delFile.delete(); } }