Add doc to Directories.java

This commit is contained in:
Louis Royer 2020-01-16 12:40:42 +01:00
parent 0e1a451214
commit 20fef41d71

View File

@ -1,13 +1,25 @@
package tools;
/** Helper to get application directories.
* @author Louis Royer
* @author Flavien Haas
* @author JS Auge
* @version 1.0
*/
public class Directories {
private String projectName;
private String dataHomeDirectory;
/** Constructor with projectName parameter.
* @param projectName name of the project
*/
public Directories(String projectName) {
this.projectName = projectName;
setDataHomeDirectory();
}
/** Setter for dataHomeDirectory. Will create the directory if not already exists.
*/
private void setDataHomeDirectory() {
/* Follow XDG Base Directory Specification
* https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
@ -31,6 +43,9 @@ public class Directories {
dataHomeDirectory = d;
}
/** Getter for dataHomeDirectory.
* @return path to the application home directory
*/
public String getDataHomeDirectory() {
return dataHomeDirectory();
}