Class OutputDir
java.lang.Object
org.junit.platform.launcher.listeners.OutputDir
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Patternprivate final Pathprivate final SecureRandom -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static booleancontainsFilesWithExtensions(Path dir, String... extensions) Determine if the supplied directory contains files with any of the supplied extensions.static OutputDir(package private) static OutputDircreateFile(String prefix, String extension) (package private) static OutputDircreateSafely(Optional<String> customDir, Supplier<Path> currentWorkingDir) Package private for testing purposes.private static OutputDircreateSafely(Optional<String> customDir, Supplier<Path> currentWorkingDir, SecureRandom random) toPath()
-
Field Details
-
OUTPUT_DIR_UNIQUE_NUMBER_PLACEHOLDER_PATTERN
-
path
-
random
-
-
Constructor Details
-
OutputDir
-
-
Method Details
-
create
-
create
-
createSafely
static OutputDir createSafely(Optional<String> customDir, Supplier<Path> currentWorkingDir) throws IOException Package private for testing purposes.- Throws:
IOException
-
createSafely
private static OutputDir createSafely(Optional<String> customDir, Supplier<Path> currentWorkingDir, SecureRandom random) throws IOException - Throws:
IOException
-
toPath
-
createFile
- Throws:
UncheckedIOException
-
containsFilesWithExtensions
private static boolean containsFilesWithExtensions(Path dir, String... extensions) throws IOException Determine if the supplied directory contains files with any of the supplied extensions.- Throws:
IOException
-