Android Directory Delete deleteDir(File f)

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

Description

delete Dir

License

Open Source License

Parameter

Parameter Description
f a parameter

Declaration

public static void deleteDir(File f) 

Method Source Code

//package com.java2s;
import java.io.File;

public class Main {
    /**/*from   w  ww.j ava 2s .  c o m*/
     * 
     * @param f
     */
    public static void deleteDir(File f) {
        try {
            if (f.isDirectory()) {
                for (File c : f.listFiles()) {
                    deleteDir(c);
                }
            }
            f.delete();
        } catch (Exception e) {

        }
    }
}

Related

  1. deleteFiles(String directory, String[] dontDelete)
  2. deleteSubdirs(String directory)
  3. removerDiretorio(File dir)
  4. deleteDirectory(File path)
  5. deleteDir(File dir)