Java Recursive Delete recursivelyDelete(String loc)

Here you can find the source of recursivelyDelete(String loc)

Description

recursively Delete

License

Open Source License

Declaration

public static void recursivelyDelete(String loc) 

Method Source Code


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

import java.io.File;

public class Main {
    public static void recursivelyDelete(File f) {
        if (f.isDirectory())
            for (File f2 : f.listFiles())
                recursivelyDelete(f2);//from www  . j a v a  2s  .co  m
        f.delete();
    }

    public static void recursivelyDelete(String loc) {
        recursivelyDelete(new File(loc));
    }
}

Related

  1. recursiveDeleteOnExit(File rootDir)
  2. recursiveDeleteOnExitHelper(File fileOrDir)
  3. recursivelyDelete(File aDirectory)
  4. recursivelyDelete(File dir)
  5. recursivelyDelete(final File root, final boolean deleteRoot)
  6. recursivelyDeleteEmptyDirectories(File fileToDelete)
  7. recursivelyDeleteEmptyParentDirectoriesUpToRoot(String path, String root)
  8. recursivelyDeleteFile(File path)
  9. recursiveRemoveDir(File dir)