public class MorePaths extends Object
| Modifier and Type | Method and Description |
|---|---|
static Path |
canonicalize(Path path)
Returns the given path in the canonical (normalized absolute) form.
|
static String |
getFileExtension(Path path)
Returns the extension of the file represented by the given path.
|
static String |
getFileName(Path path)
Returns the name of the file represented by the given path.
|
static String |
getFileNameWithoutExtension(Path path)
Returns the name of the file represented by the given path without extension.
|
static Path |
getJavaHomeDirectory()
Returns the home directory of the current JRE.
|
static Path |
getUserHomeDirectory()
Returns the home directory of the current user.
|
static Path |
getWorkingDirectory()
Returns the working directory.
|
public static Path canonicalize(Path path)
IllegalArgumentException - if path is nullpublic static String getFileExtension(Path path)
IllegalArgumentException - if path is nullpublic static String getFileName(Path path)
IllegalArgumentException - if path is nullpublic static String getFileNameWithoutExtension(Path path)
IllegalArgumentException - if path is nullpublic static Path getJavaHomeDirectory()
public static Path getUserHomeDirectory()
public static Path getWorkingDirectory()