public static FunktionConfig findFromFolder(File folder) throws IOException {
  if (folder.isDirectory()) {
    File file=new File(folder,FILE_NAME);
    if (file != null && file.exists() && file.isFile()) {
      return loadFromFile(file);
    }
    File parentFile=folder.getParentFile();
    if (parentFile != null) {
      return findFromFolder(parentFile);
    }
    FunktionConfig answer=tryFindConfigOnClassPath();
    if (answer != null) {
      return answer;
    }
    throw new IOException("Funktion configuration file does not exist: " + file.getPath());
  }
 else   if (folder.isFile()) {
    return loadFromFile(folder);
  }
  FunktionConfig answer=tryFindConfigOnClassPath();
  if (answer != null) {
    return answer;
  }
  throw new IOException("Funktion configuration folder does not exist: " + folder.getPath());
}

public static FunktionConfig findFromFolder ( File folder ) throws IOException { if ( folder . isDirectory ( ) ) { File file = new File ( folder , FILE_NAME ) ; if ( file != null && file . exists ( ) && file . isFile ( ) ) { return loadFromFile ( file ) ; } File parentFile = folder . getParentFile ( ) ; if ( parentFile != null ) { return findFromFolder ( parentFile ) ; } FunktionConfig answer = tryFindConfigOnClassPath ( ) ; if ( answer != null ) { return answer ; } throw new IOException ( "Funktion configuration file does not exist: " + file . getPath ( ) ) ; } else if ( folder . isFile ( ) ) { return loadFromFile ( folder ) ; } FunktionConfig answer = tryFindConfigOnClassPath ( ) ; if ( answer != null ) { return answer ; } throw new IOException ( "Funktion configuration folder does not exist: " + folder . getPath ( ) ) ; }
tries to find the configuration from the current directory or a parent folder .
