Java File Path Delete delFile(String pathName)

Here you can find the source of delFile(String pathName)

Description

del File

License

Open Source License

Declaration

public static boolean delFile(String pathName) 

Method Source Code

//package com.java2s;

import java.io.File;

public class Main {

    public static boolean delFile(File file) {
        if (file.isFile()) {
            return file.delete();
        }//from w w w.  j a  va  2s  . c  o m
        return false;
    }

    public static boolean delFile(String pathName) {
        File path = new File(pathName);
        return delFile(path);
    }
}

Related

  1. delFile(String filePathAndName)
  2. delFile(String filePathAndName)
  3. delFile(String filePathAndName)
  4. DelFile(String in_Path, ArrayList arrFileList)
  5. delFile(String path)
  6. delFileIfExists(String path)
  7. delFiles(String path)
  8. delTree(String path)