code: public static File getAppDir(String name) throws IOException {
  		String s1 = System.getProperty("user.home", ".");
  		File file1;
  
  		switch (OSUtil.getOs()) {
  			case WINDOWS:
  				String s2 = System.getenv("APPDATA");
  
  				if (s2 != null) {
  					file1 = new File(s2, name + '/');
  				} else {
  					file1 = new File(s1, name + '/');
  				}
  
  				break;
  			case MACOS:
  				file1 = new File(s1, "Library/Application Support/" + name);
  				break;
  			default:
  				file1 = new File(s1, name + '/');
  		}
  
  		if (!file1.exists() && !file1.mkdirs()) {
  			throw new IOException("The working directory could not be created: " + file1);
  		} else {
  			return file1;
  		}
  	}
docs: Gets a folder to store application data, such as save or config files.
  It will be located under:
  <ul>
  <li>In Windows: {@code %APPDATA%\name}, and if it fails, under {@code System.getProperty("user.home")\name}.</li>
  <li>In OSX: under {@code System.getProperty("user.home")/Library/Application Support/name}.</li>
  <li>In any other case: under {@code System.getProperty("user.home")/name}.</li>
  </ul>
  
  @param name The name of the folder (usually same as the name of the application).
  @return A folder where you should save configs, saves, etc.
  @throws java.io.IOException If folder did not exist, and could not be created.