Java Recursive Delete recursiveDelete(File target)

Here you can find the source of recursiveDelete(File target)

Description

recursive Delete

License

Open Source License

Declaration

public static boolean recursiveDelete(File target) 

Method Source Code

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

import java.io.File;

public class Main {
    public static boolean recursiveDelete(File target) {
        if (target.isDirectory()) {
            for (File f : target.listFiles())
                recursiveDelete(f);//from   w w  w.  j  a  v a 2 s. com
        }
        return target.delete();
    }
}

Related

  1. recursiveDelete(File parent)
  2. recursiveDelete(File pathToFolderOrFile)
  3. recursiveDelete(File root)
  4. recursiveDelete(File root)
  5. recursiveDelete(File rootDir, boolean deleteRoot)
  6. recursiveDelete(final File directory)
  7. recursiveDelete(final File file, final boolean childrenOnly)
  8. recursiveDelete(final File fileOrDir)
  9. recursiveDelete(final File path)