Here you can find the source of deleteFile(String filePath)
Parameter | Description |
---|---|
filePath | a parameter |
public static int deleteFile(String filePath)
//package com.java2s; //License from project: Apache License import java.io.File; public class Main { public static String LAST_ERROR = ""; /**/*w ww.j a va 2 s . c om*/ * deleteFile * @param filePath * @return */ public static int deleteFile(String filePath) { try { // file File file = new File(filePath); // delete file.delete(); // done return 1; } catch (Exception e) { LAST_ERROR = e.getMessage(); e.printStackTrace(); return -1; } } }