Java Directory Check checkDirectory(File target)

Here you can find the source of checkDirectory(File target)

Description

check Directory

License

Apache License

Declaration

private static void checkDirectory(File target) throws IllegalArgumentException 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.io.File;

public class Main {

    private static void checkDirectory(File target) throws IllegalArgumentException {
        if (target == null) {
            throw new IllegalArgumentException("argument must not be null.");
        }/*  w w w  .  j a v  a  2s .  c  o  m*/
        if (target.isFile()) {
            throw new IllegalArgumentException("argument must be directory. [" + target.getAbsolutePath() + "]");
        }
    }
}

Related

  1. checkDirectory(File directory)
  2. checkDirectory(File directory)
  3. checkDirectory(File directory)
  4. checkDirectory(File directory, String pckgname, ArrayList> classes)
  5. checkDirectory(File file)
  6. checkDirectory(final File directory)
  7. checkDirectory(final String dir, final boolean create, final String errorDirName)
  8. checkDirectory(String value)
  9. checkDirectoryArray(String[] names)