Java File Path Delete deleteFile(String path)

Here you can find the source of deleteFile(String path)

Description

delete File

License

Open Source License

Declaration

public static void deleteFile(String path) 

Method Source Code


//package com.java2s;
import java.io.File;

public class Main {
    public static void deleteFile(String path) {
        File file = new File(path);
        if (file.exists()) {
            file.delete();/*from  ww w . j a va 2 s .  co m*/
        }
    }

    public static boolean exists(String jarFilePath) {
        File file = new File(jarFilePath);
        return file.exists();
    }
}

Related

  1. deleteFile(String filePath)
  2. deleteFile(String filePath)
  3. deleteFile(String filePathAndName)
  4. deleteFile(String filePathName)
  5. deleteFile(String p_filePath, boolean pb_recursive)
  6. deleteFile(String path)
  7. deleteFile(String path)
  8. deleteFile(String path)
  9. deleteFile(String path)