Here you can find the source of fileExistsAndReadable(String file)
Parameter | Description |
---|---|
file | a parameter |
public static boolean fileExistsAndReadable(String file)
//package com.java2s; //License from project: Apache License import java.io.File; public class Main { /**// www.j a va 2 s . c o m * Checks file existence * @param file */ public static boolean fileExistsAndReadable(String file) { File f = new File(file); boolean res = (!f.isFile() || !f.canRead()) ? false : true; return res; } }