Java File Exist fileExist(String p_filename)

Here you can find the source of fileExist(String p_filename)

Description

Check if this file/directory exist

License

Open Source License

Parameter

Parameter Description
p_filename String

Return

boolean

Declaration

public static boolean fileExist(String p_filename) 

Method Source Code


//package com.java2s;
import java.io.*;

public class Main {
    /**//  w w w . j a v a  2s. com
     * Check if this file/directory exist
     * @param p_filename String
     * @return boolean
     */
    public static boolean fileExist(String p_filename) {
        return (new File(p_filename)).exists();
    }
}

Related

  1. doesExist(String fname)
  2. doesExistsInside(File src, String fileName)
  3. fileExist(String _FileName, String _Path)
  4. fileExist(String cmdPath)
  5. fileExist(String path)
  6. fileExists(File dir, String regex)
  7. fileExists(File directory, String fileName)
  8. fileExists(File file)