@API(status=INTERNAL,
since="1.9")
public class OutputDir
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private java.nio.file.Path |
path |
| Modifier | Constructor and Description |
|---|---|
private |
OutputDir(java.nio.file.Path path) |
| Modifier and Type | Method and Description |
|---|---|
private static boolean |
containsFilesWithExtensions(java.nio.file.Path dir,
java.lang.String... extensions)
Determine if the supplied directory contains files with any of the
supplied extensions.
|
static OutputDir |
create(java.util.Optional<java.lang.String> customDir) |
java.nio.file.Path |
createFile(java.lang.String prefix,
java.lang.String extension) |
(package private) static OutputDir |
createSafely(java.util.Optional<java.lang.String> customDir,
java.util.function.Supplier<java.nio.file.Path> currentWorkingDir)
Package private for testing purposes.
|
java.nio.file.Path |
toPath() |
public static OutputDir create(java.util.Optional<java.lang.String> customDir)
static OutputDir createSafely(java.util.Optional<java.lang.String> customDir, java.util.function.Supplier<java.nio.file.Path> currentWorkingDir) throws java.io.IOException
java.io.IOExceptionpublic java.nio.file.Path toPath()
public java.nio.file.Path createFile(java.lang.String prefix,
java.lang.String extension)
throws java.io.UncheckedIOException
java.io.UncheckedIOExceptionprivate static boolean containsFilesWithExtensions(java.nio.file.Path dir,
java.lang.String... extensions)
throws java.io.IOException
java.io.IOException