Java File Path Delete deleteFile(String filePath)

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

Description

delete File

License

Open Source License

Declaration

public static boolean deleteFile(String filePath) throws IOException 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.io.File;

import java.io.IOException;

public class Main {

    public static boolean deleteFile(String filePath) throws IOException {
        if (filePath == null)
            return true;
        File f = new File(filePath);
        if (f.exists()) {
            return f.delete();
        }/* ww  w. j a  va 2s.c  o  m*/
        return true;
    }
}

Related

  1. deleteFile(final String filePathName)
  2. DeleteFile(String _filePath)
  3. deletefile(String delpath)
  4. deleteFile(String filePath)
  5. deleteFile(String filePath)
  6. deleteFile(String filePath)
  7. deleteFile(String filePath)
  8. deleteFile(String filePath)
  9. deleteFile(String filePath)