Java Directory Check checkDirectory(String value)

Here you can find the source of checkDirectory(String value)

Description

check Directory

License

LGPL

Declaration

public static boolean checkDirectory(String value) 

Method Source Code


//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;
    }
}

Related

  1. checkDirectory(File directory, String pckgname, ArrayList> classes)
  2. checkDirectory(File file)
  3. checkDirectory(File target)
  4. checkDirectory(final File directory)
  5. checkDirectory(final String dir, final boolean create, final String errorDirName)
  6. checkDirectoryArray(String[] names)
  7. checkDirectoryInWorkspace(String directoryName)
  8. checkDirPath(final String path)
  9. checkDirs(File f)