public final class PathUtils
extends java.lang.Object
This class allows the default filesystem to be changed during tests.
Modifier and Type | Method and Description |
---|---|
static java.nio.file.Path |
get(java.nio.file.Path[] roots,
java.lang.String path)
Tries to resolve the given path against the list of available roots.
|
static java.nio.file.Path |
get(java.nio.file.Path[] roots,
java.net.URI uri)
Tries to resolve the given file uri against the list of available roots.
|
static java.nio.file.Path |
get(java.lang.String first,
java.lang.String... more)
Returns a
Path from name components. |
static java.nio.file.Path |
get(java.net.URI uri)
Returns a
Path from a URI |
static java.nio.file.FileSystem |
getDefaultFileSystem()
Returns the default FileSystem.
|
public static java.nio.file.Path get(java.lang.String first, java.lang.String... more)
Path
from name components.
This works just like Paths.get()
.
Remember: just like Paths.get()
this is NOT A STRING CONCATENATION
UTILITY FUNCTION.
Remember: this should almost never be used. Usually resolve a path against an existing one!
public static java.nio.file.Path get(java.net.URI uri)
Path
from a URI
This works just like Paths.get()
.
Remember: this should almost never be used. Usually resolve a path against an existing one!
public static java.nio.file.Path get(java.nio.file.Path[] roots, java.lang.String path)
public static java.nio.file.Path get(java.nio.file.Path[] roots, java.net.URI uri)
public static java.nio.file.FileSystem getDefaultFileSystem()