public static String getAccountsFile() { final String path; if (Configuration.getCurrentOperatingSystem() == OperatingSystem.WINDOWS) { path = System.getenv("APPDATA") + File.separator + Configuration.NAME + "_Accounts.ini"; } else { path = Paths.getUnixHome() + File.separator + "." + Configuration.NAME_LOWERCASE + "acct"; } return path; }
public static String getHomeDirectory() { final String env = System.getenv(Configuration.NAME.toUpperCase() + "_HOME"); if (env == null || env.isEmpty()) { return (Configuration.getCurrentOperatingSystem() == OperatingSystem.WINDOWS ? FileSystemView.getFileSystemView().getDefaultDirectory().getAbsolutePath() : Paths.getUnixHome()) + File.separator + Configuration.NAME; } else { return env; } }