Package org.ini4j

Examples of org.ini4j.Wini.store()


        o.createNewFile();

        // save in folder
        Wini out = new Wini(o);
        out.add(id, ini.get(id));
        out.store();

        // exist?
        if (!PluginLoader.getPlugins().containsKey(id)) {
          PluginLoader.getPlugins().put(id, new PluginInfo(o.getParentFile()));
        }
View Full Code Here


    // save title
    try {
      Wini ini = new Wini(new File(p.getPath(), "Game.ini"));
      ini.put("Game", "Title", p.getTitle());
      ini.put("Game", "Library", p.getData().get("library"));
      ini.store();
    } catch (Throwable t) {
      YEx.info("Can not edit " + new File(p.getPath(), "Game.ini"), t);
    }
  }
View Full Code Here

    // edit Game.ini
    try {
      Wini ini = new Wini(new File(p.getPath(), "Game.ini"));
      ini.put("Game", "Title", p.getTitle());
      ini.store();
    } catch (Throwable t) {
      YEx.info("Can not edit " + new File(p.getPath(), "Game.ini"), t);
      return false;
    }
    return true;
View Full Code Here

      File settings = new File("me3mcc.ini");
      if (!settings.exists())
        settings.createNewFile();
      ini = new Wini(settings);
      ini.put("Settings", "dlc_backup_flag", "1");
      ini.store();
    } catch (InvalidFileFormatException e) {
      e.printStackTrace();
    } catch (IOException e) {
      System.err.println("Settings file encountered an I/O error while attempting to write it. Settings not saved.");
    }
View Full Code Here

          ini = new Wini(settings);
          ini.put("Settings", "biogame_dir", appendSlash(dirChooser.getSelectedFile().toString()));
          if (ModManager.logging) {
            ModManager.debugLogger.writeMessage(appendSlash(dirChooser.getSelectedFile().toString()));
          }
          ini.store();
        } catch (InvalidFileFormatException e) {
          e.printStackTrace();
        } catch (IOException e) {
          System.err.println("Settings file encountered an I/O error while attempting to write it. Settings not saved.");
        }
View Full Code Here

          backupDLC(fieldBiogameDir.getText());
        }
      }
      // shown only once. Backup complete, set to settings file
      ini.put("Settings", "dlc_backup_flag", "1");
      ini.store();
    } catch (InvalidFileFormatException e) {
      e.printStackTrace();
    } catch (IOException e) {
      System.err.println("Settings file encountered an I/O error while attempting to write it. Settings not saved.");
    }
View Full Code Here

            JOptionPane.showMessageDialog(null, "A log file will be generated in the ME3CMM.exe directory with the filename 'me3cmm_last_run_log.txt'.\nUse this to debug your moddesc files.\nClose ME3CMM before opening your log file.\nYou must restart Mod Manager for logging to take effect.\nNote: Logs will continue to be made every time the program is run.", "Logging Mode", JOptionPane.INFORMATION_MESSAGE);
          } else {
            ini.put("Settings", "logging_mode", "0");
            ModManager.logging = false;
          }
          ini.store();
        } catch (InvalidFileFormatException error) {
          error.printStackTrace();
        } catch (IOException error) {
          if (ModManager.logging){
            ModManager.debugLogger.writeMessage("Settings file encountered an I/O error while attempting to write it. Settings not saved.");
View Full Code Here

      for (OperaPreference p : this) {
        ini.put(p.getSection(), p.getKey(), ((AbstractPreference) p).getValue(true));
      }

      ini.store(preferenceFile);
    } catch (IOException e) {
      throw new WebDriverException("Unable to write to preference file: " + e.getMessage());
    }
  }
View Full Code Here

        ini.put("httpd", "bind_address", "127.0.0.1");
        ini.put("httpd_global_handlers", "_fti", "{couch_httpd_proxy, handle_proxy_req, <<\"http://127.0.0.1:5985\">>}");



        ini.store();
    }


    private CouchDbInstance waitForEmbeddedCouch() {
        for (int i =0; i < 4; i++) {
View Full Code Here

    settingsFile.add( RESOURCES_SETTINGS_SECTION,
                      STRING_SETTINGS_TYPE.TEXTURES_PATH.toString(),
                      this.getNextRunValue( STRING_SETTINGS_TYPE.TEXTURES_PATH ) );

    File preferencesDirectory = getRelativeDirectory( "." );
    settingsFile.store( new File( preferencesDirectory, DEFAULT_CONFIG_FILE ) );
  }

  @NotNull
  private Map<STRING_SETTINGS_TYPE, String> getStringSettingsMap() {
    return this.stringSettingsMap;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.