List of usage examples for org.apache.commons.configuration PropertiesConfiguration setPath
public void setPath(String path)
From source file:tagtime.settings.Settings.java
/** * Creates a new settings manager for the given user. *//*from w ww .j av a2 s. c om*/ private Settings(String userName) { //setup this.username = userName; //settingValues = new EnumMap<SettingType, Object>(SettingType.class); String fileLocation = Main.getDataDirectory().getPath() + "/" + userName + ".properties"; //load the file PropertiesConfiguration tempProperties; try { tempProperties = new PropertiesConfiguration(fileLocation); } catch (ConfigurationException e) { //file not found tempProperties = new PropertiesConfiguration(); tempProperties.setPath(fileLocation); try { tempProperties.save(); } catch (ConfigurationException e1) { e1.printStackTrace(); } } properties = tempProperties; /*if(settingsFile.exists()) { //read the save file and load the settings BufferedReader in = new BufferedReader(new FileReader(settingsFile)); readInSettings(in); //TagTime doesn't bother reading the file from here on; if the //user changes it, those changes will be overwritten in.close(); } else { applyDefaultSettings(); flush(); }*/ }