Java File Path Delete delete(String filePath)

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

Description

delete

License

Open Source License

Declaration

public static void delete(String filePath) throws IOException 

Method Source Code


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

public class Main {

    public static void delete(String filePath) throws IOException {
        boolean result = new File(filePath).delete();
        if (!result) {
            throw new IOException("Delete " + filePath + " failed!");
        }//  w  ww .ja va2 s . c  o  m
    }
}

Related

  1. delete(File path)
  2. delete(File path, String... exclude)
  3. delete(final File path)
  4. delete(String fileNameWithFullPath)
  5. delete(String filePath)
  6. delete(String filePath)
  7. delete(String filePath)
  8. delete(String filePath, boolean recursive)
  9. delete(String path)