From de6b5f76f2d421bdce54ad75c8d8c2352879df0d Mon Sep 17 00:00:00 2001 From: JeremyStarTM Date: Mon, 2 Dec 2024 21:34:59 +0100 Subject: [PATCH] Add getPathRaw() and toString() methods --- .../engine/base/utility/FileAccess.java | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/base/src/main/java/de/staropensource/engine/base/utility/FileAccess.java b/base/src/main/java/de/staropensource/engine/base/utility/FileAccess.java index 6b8f5f8..99e2872 100644 --- a/base/src/main/java/de/staropensource/engine/base/utility/FileAccess.java +++ b/base/src/main/java/de/staropensource/engine/base/utility/FileAccess.java @@ -297,14 +297,48 @@ public final class FileAccess { // -----> File getters & setters /** * Returns the absolute path of this file. + *

+ * This method returns the path with + * {@code /} (slash) separators. * * @return absolute path + * @see #getPath() * @since v1-alpha8 */ public @NotNull String getPath() { return unformatPath(path); } + /** + * Returns the absolute path of this file. + *

+ * This method returns the path with + * {@code /} (slash) separators. + * + * @return absolute path + * @see #getPath() + * @since v1-alpha8 + */ + @Override + public @NotNull String toString() { + return getPath(); + } + + /** + * Returns the absolute path of this file. + *

+ * This method returns the path as seen + * by the operating system and JVM (i.e. + * with {@link File#separator} separators) + * + * @return absolute path + * @see #getPath() + * @since v1-alpha9 + */ + public @NotNull String getRawPath() { + return path.toString(); + } + /** * Returns the file name. *