Here you can find the source of checkDirectory(String value)
public static boolean checkDirectory(String value)
//package com.java2s; //License from project: LGPL import java.io.File; public class Main { public static boolean checkDirectory(String value) { boolean isWriteable = false; File file = new File(value); if (file.isDirectory() && file.canWrite()) { System.out.println(" \n:Able to write to the directory: " + file.getName()); isWriteable = true;/*from ww w. ja v a2 s .c om*/ } else { System.out.println(" \n:Cannot write to the directory " + value); } return isWriteable; } }