Java File Path Delete deleteFile(String filePath)

Here you can find the source of deleteFile(String filePath)

Description

delete File

License

Apache License

Declaration

public static boolean deleteFile(String filePath) 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.io.File;

public class Main {
    public static boolean deleteFile(String filePath) {
        boolean ret = true;
        try {//  w w w.j a v a2 s. com

            File file = new File(filePath);
            file.delete();

        } catch (Exception e) {
            e.printStackTrace();
            ret = false;
        }

        return ret;
    }
}

Related

  1. DeleteFile(String _filePath)
  2. deletefile(String delpath)
  3. deleteFile(String filePath)
  4. deleteFile(String filePath)
  5. deleteFile(String filePath)
  6. deleteFile(String filePath)
  7. deleteFile(String filePath)
  8. deleteFile(String filePath)
  9. deleteFile(String filePath)