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 |
getUserCacheDirectory(String appName)
Returns the application cache directory of the current user.
|
static Path |
getUserConfigDirectory(String appName)
Returns the application config directory of the current user.
|
static Path |
getUserDataDirectory(String appName)
Returns the application data directory of the current user.
|
static Path |
getUserHomeDirectory()
Returns the home directory of the current user.
|
static Path |
getUserLogDirectory(String appName)
Returns the application log 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 getUserCacheDirectory(String appName)
IllegalArgumentException - if appName is null or emptypublic static Path getUserConfigDirectory(String appName)
IllegalArgumentException - if appName is null or emptypublic static Path getUserDataDirectory(String appName)
IllegalArgumentException - if appName is null or emptypublic static Path getUserHomeDirectory()
public static Path getUserLogDirectory(String appName)
IllegalArgumentException - if appName is null or emptypublic static Path getWorkingDirectory()