From 20fef41d7166c997a827db9f23105b2bccd99879 Mon Sep 17 00:00:00 2001 From: Louis Date: Thu, 16 Jan 2020 12:40:42 +0100 Subject: [PATCH] Add doc to Directories.java --- src/tools/Directories.java | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/tools/Directories.java b/src/tools/Directories.java index f4e8ead..3782a2e 100644 --- a/src/tools/Directories.java +++ b/src/tools/Directories.java @@ -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(); }