Java Delete File Recursively deleteRecursively(File fileOrDir)

Here you can find the source of deleteRecursively(File fileOrDir)

Description

delete Recursively

License

Open Source License

Declaration

public static void deleteRecursively(File fileOrDir) 

Method Source Code

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

import java.io.File;

public class Main {
    public static void deleteRecursively(File fileOrDir) {
        if (fileOrDir.isDirectory())
            for (File f : fileOrDir.listFiles())
                deleteRecursively(f);/* w  w  w.ja v a 2s  . c  om*/
        fileOrDir.delete();
    }
}

Related

  1. deleteRecursively(File file)
  2. deleteRecursively(File file)
  3. deleteRecursively(File file)
  4. deleteRecursively(File file)
  5. deleteRecursively(File fileEntry)
  6. deleteRecursively(File fileOrDir)
  7. deleteRecursively(File fileToDelete)
  8. deleteRecursively(File fRoot)
  9. deleteRecursively(File name)