Java File Delete delete(File f)

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

Description

delete

License

Open Source License

Declaration

public static void delete(File f) 

Method Source Code


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

import java.io.File;

public class Main {
    public static void delete(File f) {
        if (f.isDirectory()) {
            for (File c : f.listFiles())
                delete(c);// www  . ja va  2s . c om
        }
        if (!f.delete())
            System.out.println(
                    "Failed to delete file: " + f + " file does " + f.exists() + " exists (false = not..)");
    }
}

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)