Here you can find the source of FileExists(String fileName)
public static boolean FileExists(String fileName)
//package com.java2s; //License from project: Open Source License import java.io.*; public class Main { public static boolean FileExists(String fileName) { return (new File(fileName).exists()); }//from w w w . j a v a2 s .c o m /** * Checks if an element exists in a given array. * @param array the array to search within * @param element the element we want to search for * @param <T> the generic type. * @return true if the given element exists in the array. */ public static <T> boolean exists(List<T> array, T element) { for (T currentElement : array) { if (element.equals(currentElement)) return true; } return false; } }