Java File Exist fileExists(String filePathString)

Here you can find the source of fileExists(String filePathString)

Description

file Exists

License

Open Source License

Parameter

Parameter Description
filePathString Path to the file to check.

Return

Returns that a file exists at the specified path.

Declaration

public static boolean fileExists(String filePathString) 

Method Source Code


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

import java.io.File;

public class Main {
    /**/*from w  w  w  .  j  av a  2  s .co  m*/
     * @param filePathString Path to the file to check.
     * @return Returns that a file exists at the specified path.
     */
    public static boolean fileExists(String filePathString) {
        File f = new File(filePathString);
        return f.exists() && !f.isDirectory();
    }
}

Related

  1. fileExists(String filename)
  2. FileExists(String fileName)
  3. FileExists(String filePath)
  4. fileExists(String filepath)
  5. fileExists(String filePath)
  6. fileExists(String fName)
  7. fileExists(String folderPath, String fileName)
  8. fileExists(String name)
  9. fileExists(String parentDirectory, String filename)