Java File Exist isFileExistNotCreate(String fileNameAndPath)

Here you can find the source of isFileExistNotCreate(String fileNameAndPath)

Description

check if the specified file exists

License

Open Source License

Parameter

Parameter Description
fileNameAndPath the name of the file to be checked

Return

boolean true if exits, false if not

Declaration

public static boolean isFileExistNotCreate(String fileNameAndPath) 

Method Source Code


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

import java.io.*;

public class Main {
    /**/*www.j  av  a 2  s .c  o  m*/
     * check if the specified file exists
     *
     * @param fileNameAndPath
     *       the name of the file to be checked
     * @return boolean true if exits, false if not
     */
    public static boolean isFileExistNotCreate(String fileNameAndPath) {
        return new File(fileNameAndPath).isFile();
    }
}

Related

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