Android File Delete deleteFile(String strSrc)

Here you can find the source of deleteFile(String strSrc)

Description

Delete file

Parameter

Parameter Description
strSrc file to delete

Return

true if succees, otherswise false

Declaration

// //////////////////////////////////////////////////////
public static boolean deleteFile(String strSrc) 

Method Source Code

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

public class Main {
    /**//from  ww  w  .  j  a  v a  2  s.c  o  m
     * Delete file
     * 
     * @param strSrc
     *            file to delete
     * @return true if succees, otherswise false
     * @author Thai Hoang Hiep
     */
    // //////////////////////////////////////////////////////
    public static boolean deleteFile(String strSrc) {
        File flSrc = new File(strSrc);
        return flSrc.delete();
    }
}

Related

  1. deleteFile(String filename)
  2. deleteFile(String path)
  3. deleteFile(String path)
  4. deleteFile(String path)
  5. deleteFile(String path)
  6. deleteFileOnly(String path)
  7. deleteFiles(File file)
  8. deleteFiles(File file, String regex)
  9. deleteFilesRecursive(File src)