Android File Delete delfile(String path)

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

Description

delfile

Declaration

public static boolean delfile(String path) 

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();/*ww  w.j ava  2s . co m*/

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

        return !file.exists();
    }
}

Related

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