forked from StarOpenSource/Engine
Add getPathRaw() and toString() methods
This commit is contained in:
parent
19f6838300
commit
de6b5f76f2
1 changed files with 34 additions and 0 deletions
|
@ -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.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in a new issue