public class PathUtils extends Object
Constructor and Description |
---|
PathUtils() |
Modifier and Type | Method and Description |
---|---|
static Path |
getParent(Path path)
Constructs a relative path between two folders.
|
static boolean |
isAbsolute(String resource)
Checks whether the resource is absolute (whether starts with "/")
|
static boolean |
isAbsoluteOrRemote(String resource)
Helper method to discover whether given resource
is absolute or remote.
|
static boolean |
isRemote(String resource)
Checks whether the resource is remote (whether contains with "://")
|
static String |
processResource(String resource,
Path context)
Relativize the process against given context
|
public static Path getParent(Path path)
relativized
- the path to be relativizedbase
- the path to be relativized againstpublic static String processResource(String resource, Path context)
resource
- file name to be processedcontext
- relative contextpublic static boolean isAbsoluteOrRemote(String resource)
isAbsolute
and isRemote
methodsresource
- to be analyzedpublic static boolean isAbsolute(String resource)
resource
- to be analyzedpublic static boolean isRemote(String resource)
resource
- to be analyzedCopyright © 2013. All Rights Reserved.