Here you can find the source of delete(File f)
Parameter | Description |
---|---|
f | the file (may be null). |
f.close
, or true if f
is null.
public static boolean delete(File f)
//package com.java2s; //License from project: Open Source License import java.io.File; public class Main { /**/*from w w w .j ava 2 s . c o m*/ * Delete the file. Throws no exception (even * if file is null). * * @param f the file (may be null). * * @return the outcome of <code>f.close</code>, * or true if <code>f</code> is null. */ public static boolean delete(File f) { if (f == null) { return true; } return f.delete(); } }