public static String getConfigDir() { if (JMupenUtils.getOs().equals("mac") || JMupenUtils.getOs().equals("lin")) { return JMupenUtils.getHome(); } else { return System.getProperty("java.io.tmpdir"); } }
public static String getJmupenConfigDir() { if (JMupenUtils.getOs().equalsIgnoreCase("win")) { return System.getenv("APPDATA").concat(JMupenUtils.getBar().concat("Mupen64Plus")); } else { return JMupenUtils.getHome() .concat(JMupenUtils.getBar()) .concat(".config") .concat(JMupenUtils.getBar()) .concat("mupen64plus"); } }
public static String getJmupenSaveDir() { String dir = JMupenUtils.getJmupenHome().concat(JMupenUtils.getBar()).concat("save"); Path f = Paths.get(dir); if (!Files.exists(f)) { try { Files.createDirectories(f); } catch (IOException ex) { JMupenGUI.getInstance() .showError( "FATAL", "Can't create default save directory. JMupen won't work without a savefiles directory. I will temporary use home folder."); return JMupenUtils.getHome(); } } return dir; }