Java tutorial
//package com.java2s; import java.io.File; public class Main { public static void deleteFromFile(File file) { if (null != file && file.exists()) file.delete(); } }