Here you can find the source of deleteFile(String fileName)
Parameter | Description |
---|---|
fileName | a parameter |
public static boolean deleteFile(String fileName)
//package com.java2s; //License from project: Open Source License import java.io.File; public class Main { public static boolean deleteFile(String fileName) { File file = new File(fileName); if (file.exists() && file.isFile()) { return file.delete(); }/*from w w w . j a v a 2 s . co m*/ return true; } }