Android File Delete deleteFile(File f)

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

Description

delete File

Declaration

public static void deleteFile(File f) 

Method Source Code

//package com.java2s;

import java.io.File;

public class Main {
    public static void deleteFile(File f) {
        if (f.isDirectory()) {
            for (File f2 : f.listFiles())
                deleteFile(f2);/*from w w  w.  j a  v  a  2 s.  c  o  m*/
        }
        if (!f.delete())
            throw new RuntimeException("Unable to delete file: " + f);
    }
}

Related

  1. removeableFile(File folder, String fileName)
  2. renameFile(String strSrc, String strDest, boolean deleteIfExist)
  3. safelyDeleteFile(File filePath)
  4. safelyDeleteFile(String filePath)
  5. deleteFolderFile(String filePath, boolean deleteThisPath)
  6. deleteFile(File file)
  7. deleteFile(String filePath)
  8. delete(File file)
  9. deleteFile(String fileName)