From 231e0893af44574b3d9f0891eb6655d4f2c4956f Mon Sep 17 00:00:00 2001 From: Graham Date: Fri, 3 Apr 2020 21:07:45 +0100 Subject: [PATCH] Add java.nio.file.Paths import Annoyingly a bunch of IDEA's refactoring tools seem to cause imports to disappear. Signed-off-by: Graham --- cli/src/main/java/dev/openrs2/cli/OptionExtensions.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cli/src/main/java/dev/openrs2/cli/OptionExtensions.kt b/cli/src/main/java/dev/openrs2/cli/OptionExtensions.kt index 0f56e45f7a..c08e1925a1 100644 --- a/cli/src/main/java/dev/openrs2/cli/OptionExtensions.kt +++ b/cli/src/main/java/dev/openrs2/cli/OptionExtensions.kt @@ -8,13 +8,14 @@ import com.github.ajalt.clikt.parameters.options.default import java.io.InputStream import java.io.OutputStream import java.nio.file.Files +import java.nio.file.Paths fun RawOption.inputStream(): NullableOption { return convert("FILE") { return@convert if (it == "-") { System.`in` } else { - Files.newInputStream(java.nio.file.Paths.get(it)) + Files.newInputStream(Paths.get(it)) } } } @@ -28,7 +29,7 @@ fun RawOption.outputStream(): NullableOption { return@convert if (it == "-") { System.out } else { - Files.newOutputStream(java.nio.file.Paths.get(it)) + Files.newOutputStream(Paths.get(it)) } } }