javagit/src/main/java/edu/nyu/cs/javagit/utilities/CheckUtilities.java
public static void checkFileValidity(String filename) throws IOException {
    File file = new File(filename);
    if (!file.exists()) {
      throw new IOException(ExceptionMessageMap.getMessage("020001") + "  { filename=[" + filename
          + "] }");
    }
  }
public static void checkFileValidity(String filename) throws IOException {
    File file = new File(filename);
    if (!file.exists()) {
      throw new IOException(ExceptionMessageMap.getMessage("020001") + "  { filename=[" + filename
          + "] }");
    }
  }
Checks that the specified filename exists. This assumes that the above check for string
validity has already been run and the path/filename is neither null or of size 0.

@param filename
File or directory path