Add doc to Directories.java
This commit is contained in:
parent
0e1a451214
commit
20fef41d71
@ -1,13 +1,25 @@
|
|||||||
package tools;
|
package tools;
|
||||||
|
|
||||||
|
/** Helper to get application directories.
|
||||||
|
* @author Louis Royer
|
||||||
|
* @author Flavien Haas
|
||||||
|
* @author JS Auge
|
||||||
|
* @version 1.0
|
||||||
|
*/
|
||||||
public class Directories {
|
public class Directories {
|
||||||
private String projectName;
|
private String projectName;
|
||||||
private String dataHomeDirectory;
|
private String dataHomeDirectory;
|
||||||
|
|
||||||
|
/** Constructor with projectName parameter.
|
||||||
|
* @param projectName name of the project
|
||||||
|
*/
|
||||||
public Directories(String projectName) {
|
public Directories(String projectName) {
|
||||||
this.projectName = projectName;
|
this.projectName = projectName;
|
||||||
setDataHomeDirectory();
|
setDataHomeDirectory();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Setter for dataHomeDirectory. Will create the directory if not already exists.
|
||||||
|
*/
|
||||||
private void setDataHomeDirectory() {
|
private void setDataHomeDirectory() {
|
||||||
/* Follow XDG Base Directory Specification
|
/* Follow XDG Base Directory Specification
|
||||||
* https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
|
* https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
|
||||||
@ -31,6 +43,9 @@ public class Directories {
|
|||||||
dataHomeDirectory = d;
|
dataHomeDirectory = d;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Getter for dataHomeDirectory.
|
||||||
|
* @return path to the application home directory
|
||||||
|
*/
|
||||||
public String getDataHomeDirectory() {
|
public String getDataHomeDirectory() {
|
||||||
return dataHomeDirectory();
|
return dataHomeDirectory();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user