Java File Exist isFileExisted(String filePathname)

Here you can find the source of isFileExisted(String filePathname)

Description

is File Existed

License

Open Source License

Declaration

public static boolean isFileExisted(String filePathname) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.io.File;

public class Main {
    public static boolean isFileExisted(String filePathname) {
        boolean existed;
        try {/*from  w  w w  . j  a  v  a2s  .c o m*/
            File f = new File(filePathname);
            existed = f.isFile();
        } catch (Exception e) {
            existed = false;
        }
        return existed;
    }
}

Related

  1. isFileExist(String filePath)
  2. isFileExist(String filePath)
  3. isFileExist(String path)
  4. isFileExist(String sFileName)
  5. isFileExistByRegex(String dir, final String regex)
  6. isFileExistent(String path)
  7. isFileExistNotCreate(String fileNameAndPath)
  8. isFileExists(String f, String ext)
  9. isFileExists(String filePath)