Android File Delete delfile(String path, String name)

Here you can find the source of delfile(String path, String name)

Description

delfile

Declaration

public static boolean delfile(String path, String name) 

Method Source Code

import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.nio.channels.FileChannel;
import java.util.ArrayList;

public class Main{
    public static boolean delfile(String path, String name) {
        File file = new File(path + Dependence.getPathChar() + name);
        file.delete();//from  w w  w  .ja v a 2s.co  m

        return !file.exists();
    }
    public static boolean delfile(String path) {
        File file = new File(path);
        file.delete();

        return !file.exists();
    }
}

Related

  1. deleteSubfiles(String publishTemppath)
  2. deleteTempDir(File dir)
  3. deleteTempFile(File tmpFile)
  4. deleteTempFiles()
  5. delfile(String path)
  6. findDeleteClasspathFile(String filename)
  7. forceDelete(File file)
  8. forceDelete(File file)
  9. forceDelete(String file)