Here you can find the source of fileExists(String filePathString)
Parameter | Description |
---|---|
filePathString | Path to the file to check. |
public static boolean fileExists(String filePathString)
//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(); } }