@NotNull public static SaveDirectory from(File file) throws FileNotFoundException {
  File currentFile=file;
  SaveDirectory result=null;
  if (currentFile == null) {
  }
 else {
    result=createValidSaveDirectory(currentFile);
    currentFile=currentFile.getParentFile();
    if (result != null) {
      return result;
    }
 else     if (currentFile == null) {
    }
 else {
      result=createValidSaveDirectory(currentFile);
      currentFile=currentFile.getParentFile();
      if (result != null) {
        return result;
      }
 else {
      }
    }
  }
  throw new FileNotFoundException("unable to load save directory: " + file);
}

@ NotNull public static SaveDirectory from ( File file ) throws FileNotFoundException { File currentFile = file ; SaveDirectory result = null ; if ( currentFile == null ) { } else { result = createValidSaveDirectory ( currentFile ) ; currentFile = currentFile . getParentFile ( ) ; if ( result != null ) { return result ; } else if ( currentFile == null ) { } else { result = createValidSaveDirectory ( currentFile ) ; currentFile = currentFile . getParentFile ( ) ; if ( result != null ) { return result ; } else { } } } throw new FileNotFoundException ( "unable to load save directory: " + file ) ; }
returns a new valid instance of the class savedirectory . it tries to use the given file . if that is not valid it tires to use its parent file . if that is also not valid it will throw a filenotfoundexception .
