public class MorePaths
extends java.lang.Object
| Modifier and Type | Method | Description |
|---|---|---|
static java.nio.file.Path |
canonicalize(java.nio.file.Path path) |
Returns the given path in the canonical (normalized absolute) form.
|
static java.lang.String |
getFileExtension(java.nio.file.Path path) |
Returns the extension of the file represented by the given path.
|
static java.lang.String |
getFileName(java.nio.file.Path path) |
Returns the name of the file represented by the given path.
|
static java.lang.String |
getFileNameWithoutExtension(java.nio.file.Path path) |
Returns the name of the file represented by the given path without extension.
|
static java.nio.file.Path |
getJavaHomeDirectory() |
Returns the home directory of the current JRE.
|
static java.nio.file.Path |
getUserCacheDirectory(java.lang.String appName) |
Returns the application cache directory of the current user.
|
static java.nio.file.Path |
getUserConfigDirectory(java.lang.String appName) |
Returns the application config directory of the current user.
|
static java.nio.file.Path |
getUserDataDirectory(java.lang.String appName) |
Returns the application data directory of the current user.
|
static java.nio.file.Path |
getUserHomeDirectory() |
Returns the home directory of the current user.
|
static java.nio.file.Path |
getUserLogDirectory(java.lang.String appName) |
Returns the application log directory of the current user.
|
static java.nio.file.Path |
getWorkingDirectory() |
Returns the working directory.
|
public static java.nio.file.Path canonicalize(java.nio.file.Path path)
java.lang.IllegalArgumentException - if path is nullpublic static java.lang.String getFileExtension(java.nio.file.Path path)
java.lang.IllegalArgumentException - if path is nullpublic static java.lang.String getFileName(java.nio.file.Path path)
java.lang.IllegalArgumentException - if path is nullpublic static java.lang.String getFileNameWithoutExtension(java.nio.file.Path path)
java.lang.IllegalArgumentException - if path is nullpublic static java.nio.file.Path getJavaHomeDirectory()
public static java.nio.file.Path getUserCacheDirectory(java.lang.String appName)
java.lang.IllegalArgumentException - if appName is null or emptypublic static java.nio.file.Path getUserConfigDirectory(java.lang.String appName)
java.lang.IllegalArgumentException - if appName is null or emptypublic static java.nio.file.Path getUserDataDirectory(java.lang.String appName)
java.lang.IllegalArgumentException - if appName is null or emptypublic static java.nio.file.Path getUserHomeDirectory()
public static java.nio.file.Path getUserLogDirectory(java.lang.String appName)
java.lang.IllegalArgumentException - if appName is null or emptypublic static java.nio.file.Path getWorkingDirectory()