public final class PathUtils extends Object
| Constructor and Description |
|---|
PathUtils() |
| Modifier and Type | Method and Description |
|---|---|
static String |
concat(String parent,
String child)
组合路径.
|
static URL |
fileAsUrl(File file) |
static URL |
fileAsUrl(String file) |
static String |
getRelativePath(String baseFile,
String file)
计算相对路径.
|
static String |
normalize(String originPath)
Returns normalized
path (or simply the path if
it is already in normalized form). |
static String |
separatorsToSystem(String path)
转为系统默认样式的路径.
|
static String |
separatorsToUnix(String path)
转为 Unix 样式的路径.
|
static String |
separatorsToWindows(String path)
转为 Windows 样式的路径.
|
static File |
urlAsFile(URL url) |
static String |
urlAsPath(URL url) |
public static String normalize(String originPath)
path (or simply the path if
it is already in normalized form). Normalized path does not contain any
empty or "." segments or ".." segments preceded by other segment than
"..".originPath - path to normalizeCopyright © 2016 jetbrick. All rights reserved.