Android File Delete delete(File f)

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

Description

Delete the given file or directory

Declaration

public static void delete(File f) 

Method Source Code

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

public class Main {
    /** Delete the given file or directory */
    public static void delete(File f) {
        if (f.isDirectory()) {
            for (File c : f.listFiles()) {
                delete(c);/* w  w  w  .j a  v a2s . co m*/
            }
        }

        f.delete();
    }
}

Related

  1. DeleteFiles(File dir, FilenameFilter filter)
  2. delFile(String path)
  3. delete(File file)
  4. delete(File toDelete)
  5. deleteAll(File file)
  6. deleteAndRename(File toDelete, File toRename)