Java File Path Delete DelFile(String in_Path, ArrayList arrFileList)

Here you can find the source of DelFile(String in_Path, ArrayList arrFileList)

Description

Del File

License

Open Source License

Parameter

Parameter Description
in_Path String
arrFileList ArrayList

Exception

Parameter Description
Exception an exception

Declaration

public static void DelFile(String in_Path, ArrayList arrFileList)
        throws Exception 

Method Source Code

//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();

    }
}

Related

  1. delFile(String filePath, String fileName)
  2. delFile(String filePathAndName)
  3. delFile(String filePathAndName)
  4. delFile(String filePathAndName)
  5. delFile(String filePathAndName)
  6. delFile(String path)
  7. delFile(String pathName)
  8. delFileIfExists(String path)
  9. delFiles(String path)