Add getPathRaw() and toString() methods

This commit is contained in:
JeremyStar™ 2024-12-02 21:34:59 +01:00
parent 19f6838300
commit de6b5f76f2
Signed by: JeremyStarTM
GPG key ID: E366BAEF67E4704D

View file

@ -297,14 +297,48 @@ public final class FileAccess {
// -----> File getters & setters // -----> File getters & setters
/** /**
* Returns the absolute path of this file. * Returns the absolute path of this file.
* <p>
* This method returns the path with
* {@code /} (slash) separators.
* *
* @return absolute path * @return absolute path
* @see #getPath()
* @since v1-alpha8 * @since v1-alpha8
*/ */
public @NotNull String getPath() { public @NotNull String getPath() {
return unformatPath(path); return unformatPath(path);
} }
/**
* Returns the absolute path of this file.
* <p>
* 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.
* <p>
* 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. * Returns the file name.
* *