Here you can find the source of deleteIfExists(Path value)
public static boolean deleteIfExists(Path value) throws IOException
//package com.java2s; //License from project: Open Source License import java.io.IOException; import java.nio.file.*; public class Main { public static boolean deleteIfExists(Path value) throws IOException { return Files.deleteIfExists(value); }//from ww w .j a va2 s . c om }