Here you can find the source of isReadableFile(final String filename)
Parameter | Description |
---|---|
filename | a parameter |
public static boolean isReadableFile(final String filename)
//package com.java2s; /*-------------------------------------------------------- * Copyright (c) 2011, The Dojo Foundation * This software is distributed under the "Simplified BSD license", * the text of which is available at http://www.winktoolkit.org/licence.txt * or see the "license.txt" file for more details. *--------------------------------------------------------*/ import java.io.File; public class Main { /**//from ww w .j av a 2 s . com * @param filename * @return */ public static boolean isReadableFile(final String filename) { // System.out.println("isReadableFile: " + filename); final File f = new File(filename); if (f.exists() && f.isFile() && f.canRead()) { return true; } return false; } }