Constructor and Description |
---|
PathUtil() |
Modifier and Type | Method and Description |
---|---|
static Path |
getPathFromUri(URI uri)
Returns a path object from the given URI.
|
static String |
getRelative(Path basedir,
Path file)
Given a basedir and a child file, return the relative path to the child.
|
static String |
getRelative(String basedir,
Path file) |
static String |
getRelative(String basedir,
String child)
Given a basedir and a child file, return the relative path to the child.
|
static String |
toUrl(Path file) |
static String |
toUrl(String path) |
public PathUtil()
public static String getRelative(Path basedir, Path file)
basedir
- the basedir.file
- the file to get the relative path for.public static String getRelative(String basedir, Path file)
public static String getRelative(String basedir, String child)
basedir
- the basedir.child
- the child path (can be a full path)public static Path getPathFromUri(URI uri)
uri
- the uri to convertFileSystemNotFoundException
- if the uri scheme is not known.Copyright © 2006–2019 The Apache Software Foundation. All rights reserved.