Java File Delete delete(File f)

Here you can find the source of delete(File f)

Description

delete

License

Apache License

Declaration

static void delete(File f) 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.io.File;

public class Main {
    static void delete(File f) {
        boolean success = f.delete();
        String path = f.getAbsolutePath();
        if (success) {
            System.out.println("delete file : " + path);
        } else {/*www .j  a va 2  s. c  o m*/
            throw new IllegalStateException("deleting file failed. " + path);
        }
    }
}

Related

  1. delete(File f)
  2. delete(File f)
  3. delete(File f)
  4. delete(File f)
  5. delete(File f)
  6. delete(File f)
  7. delete(File f)
  8. delete(File f)
  9. delete(File f)