Here you can find the source of isFileExists(String filePath)
Parameter | Description |
---|---|
filePath | a parameter |
public static boolean isFileExists(String filePath)
//package com.java2s; //License from project: Apache License import java.io.File; public class Main { public static String LAST_ERROR = ""; /**/*from w w w . j a va 2s . c o m*/ * determines the existence of file * @param filePath * @return */ public static boolean isFileExists(String filePath) { try { return new File(filePath).exists(); } catch (Exception e) { LAST_ERROR = e.getMessage(); e.printStackTrace(); return false; } } }