public final class Resources extends Object
| Modifier and Type | Method and Description |
|---|---|
static io.vavr.control.Try<Path> |
getResourcePath(String resourceRelativePath)
This method gets the
Path associated to a classpath-located file. |
static io.vavr.control.Try<URL> |
getResourceURL(String resourceRelativePath)
This method gets the
Path associated to a classpath-located file. |
static io.vavr.control.Try<List<Path>> |
listFiles(Path directory)
Returns a stream from the files in the given directory.
|
public static io.vavr.control.Try<Path> getResourcePath(String resourceRelativePath)
Path associated to a classpath-located file.resourceRelativePath - The path from the root of the classpath (target/classes/ in a maven project)public static io.vavr.control.Try<URL> getResourceURL(String resourceRelativePath)
Path associated to a classpath-located file.resourceRelativePath - The path from the root of the classpath (target/classes/ in a maven project)public static io.vavr.control.Try<List<Path>> listFiles(Path directory)
DirectoryStream.directory - The directory to iterate overPath was not a
directory.Copyright © 2018. All rights reserved.