public class PathUtil extends Object
| Constructor and Description |
|---|
PathUtil() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
folderExists(String path)
Check whether specified path exists and is folder
|
static String |
getFirstLevelFolder(String rootFolder,
String targetPath)
Get the absolute path of the first sub-folder from root folder to target path
|
static boolean |
isAbsolutePath(String path)
Check whether a path string is represent for a absolute path
|
static String |
join(String folder,
String file)
Join a path text and a file name to full file path
|
public static String join(String folder, String file)
folder - path textfile - file namepublic static String getFirstLevelFolder(String rootFolder, String targetPath)
rootFolder - specify root folder pathtargetPath - any sub path inside root folderpublic static boolean folderExists(String path)
path - path to checkpublic static boolean isAbsolutePath(String path)
path - origin pathCopyright © 2021. All rights reserved.