Use File instead of String

This commit is contained in:
AsamK
2020-12-25 23:07:36 +01:00
parent 5c754b6f5d
commit 22f19c4067
7 changed files with 61 additions and 54 deletions

View File

@@ -9,9 +9,9 @@ public class PathConfig {
private final File avatarsPath;
public static PathConfig createDefault(final File settingsPath) {
return new PathConfig(new File(settingsPath, "/data"),
new File(settingsPath, "/attachments"),
new File(settingsPath, "/avatars"));
return new PathConfig(new File(settingsPath, "data"),
new File(settingsPath, "attachments"),
new File(settingsPath, "avatars"));
}
private PathConfig(final File dataPath, final File attachmentsPath, final File avatarsPath) {
@@ -20,15 +20,15 @@ public class PathConfig {
this.avatarsPath = avatarsPath;
}
public String getDataPath() {
return dataPath.getPath();
public File getDataPath() {
return dataPath;
}
public String getAttachmentsPath() {
return attachmentsPath.getPath();
public File getAttachmentsPath() {
return attachmentsPath;
}
public String getAvatarsPath() {
return avatarsPath.getPath();
public File getAvatarsPath() {
return avatarsPath;
}
}