From 01a943dd0db43a0e1ed5b996b4c8a08abe5618c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E6=80=A1=E7=84=B6?= Date: Mon, 19 Feb 2024 02:10:04 +0800 Subject: [PATCH] fix build --- .../test/MiraiConsoleIntegrationTestBootstrap.kt | 4 ++-- .../backend/mirai-console/test/TestMiraiConosle.kt | 2 +- .../test/data/MultiFilePluginDataStorageImplTests.kt | 2 +- .../backend/mirai-console/test/data/PluginDataTest.kt | 2 +- .../test/testFramework/MockConsoleImplementation.kt | 2 +- .../mirai-console-frontend-base/src/FrontendBase.kt | 2 +- .../mirai-console-frontend-base/src/logging/LogRecorder.kt | 6 +++--- .../src/MiraiConsoleImplementationTerminal.kt | 4 ++-- .../tools/intellij-plugin/src/diagnostics/TaskUtils.kt | 2 +- 9 files changed, 13 insertions(+), 13 deletions(-) diff --git a/mirai-console/backend/integration-test/test/MiraiConsoleIntegrationTestBootstrap.kt b/mirai-console/backend/integration-test/test/MiraiConsoleIntegrationTestBootstrap.kt index 042b89e666..e6ed55d9f2 100644 --- a/mirai-console/backend/integration-test/test/MiraiConsoleIntegrationTestBootstrap.kt +++ b/mirai-console/backend/integration-test/test/MiraiConsoleIntegrationTestBootstrap.kt @@ -13,8 +13,8 @@ import net.mamoe.console.integrationtest.testpoints.MCITBSelfAssertions import org.objectweb.asm.ClassReader import java.io.File import java.lang.management.ManagementFactory -import java.nio.file.Files -import java.nio.file.Paths +import com.llamalab.safs.Files +import com.llamalab.safs.Paths import java.util.* import java.util.stream.Collectors import kotlin.io.path.inputStream diff --git a/mirai-console/backend/mirai-console/test/TestMiraiConosle.kt b/mirai-console/backend/mirai-console/test/TestMiraiConosle.kt index f6a2fab17f..a9a31ce482 100644 --- a/mirai-console/backend/mirai-console/test/TestMiraiConosle.kt +++ b/mirai-console/backend/mirai-console/test/TestMiraiConosle.kt @@ -24,7 +24,7 @@ import net.mamoe.mirai.utils.BotConfiguration import net.mamoe.mirai.utils.LoginSolver import net.mamoe.mirai.utils.MiraiLogger import net.mamoe.mirai.utils.PlatformLogger -import java.nio.file.Path +import com.llamalab.safs.Path import kotlin.coroutines.Continuation import kotlin.coroutines.CoroutineContext import kotlin.coroutines.resume diff --git a/mirai-console/backend/mirai-console/test/data/MultiFilePluginDataStorageImplTests.kt b/mirai-console/backend/mirai-console/test/data/MultiFilePluginDataStorageImplTests.kt index 49afec3bc6..e6e7b80312 100644 --- a/mirai-console/backend/mirai-console/test/data/MultiFilePluginDataStorageImplTests.kt +++ b/mirai-console/backend/mirai-console/test/data/MultiFilePluginDataStorageImplTests.kt @@ -16,7 +16,7 @@ import net.mamoe.mirai.console.internal.data.MultiFilePluginDataStorageImpl import net.mamoe.mirai.console.testFramework.AbstractConsoleInstanceTest import org.junit.jupiter.api.Test import org.junit.jupiter.api.io.TempDir -import java.nio.file.Path +import com.llamalab.safs.Path import kotlin.test.assertEquals internal class MultiFilePluginDataStorageImplTests : AbstractConsoleInstanceTest() { diff --git a/mirai-console/backend/mirai-console/test/data/PluginDataTest.kt b/mirai-console/backend/mirai-console/test/data/PluginDataTest.kt index 7cf4abc0c2..dc5b8007c4 100644 --- a/mirai-console/backend/mirai-console/test/data/PluginDataTest.kt +++ b/mirai-console/backend/mirai-console/test/data/PluginDataTest.kt @@ -20,7 +20,7 @@ import net.mamoe.mirai.message.data.SingleMessage import net.mamoe.mirai.message.data.messageChainOf import net.mamoe.mirai.utils.mapPrimitive import org.junit.jupiter.api.io.TempDir -import java.nio.file.Path +import com.llamalab.safs.Path import kotlin.test.Test import kotlin.test.assertEquals import kotlin.test.assertSame diff --git a/mirai-console/backend/mirai-console/test/testFramework/MockConsoleImplementation.kt b/mirai-console/backend/mirai-console/test/testFramework/MockConsoleImplementation.kt index ed4e1dd657..68e3b43b86 100644 --- a/mirai-console/backend/mirai-console/test/testFramework/MockConsoleImplementation.kt +++ b/mirai-console/backend/mirai-console/test/testFramework/MockConsoleImplementation.kt @@ -28,7 +28,7 @@ import net.mamoe.mirai.utils.BotConfiguration import net.mamoe.mirai.utils.LoginSolver import net.mamoe.mirai.utils.MiraiLogger import net.mamoe.mirai.utils.PlatformLogger -import java.nio.file.Path +import com.llamalab.safs.Path import kotlin.contracts.InvocationKind import kotlin.contracts.contract import kotlin.coroutines.CoroutineContext diff --git a/mirai-console/frontend/mirai-console-frontend-base/src/FrontendBase.kt b/mirai-console/frontend/mirai-console-frontend-base/src/FrontendBase.kt index 3cca03bad5..05c6e9eee6 100644 --- a/mirai-console/frontend/mirai-console-frontend-base/src/FrontendBase.kt +++ b/mirai-console/frontend/mirai-console-frontend-base/src/FrontendBase.kt @@ -16,7 +16,7 @@ import net.mamoe.mirai.console.frontendbase.logging.DailySplitLogRecorder import net.mamoe.mirai.console.frontendbase.logging.LogRecorder import net.mamoe.mirai.utils.MiraiLogger import java.io.PrintStream -import java.nio.file.Path +import com.llamalab.safs.Path import java.util.concurrent.ThreadFactory import java.util.concurrent.atomic.AtomicInteger diff --git a/mirai-console/frontend/mirai-console-frontend-base/src/logging/LogRecorder.kt b/mirai-console/frontend/mirai-console-frontend-base/src/logging/LogRecorder.kt index 5d150101ad..ec60029114 100644 --- a/mirai-console/frontend/mirai-console-frontend-base/src/logging/LogRecorder.kt +++ b/mirai-console/frontend/mirai-console-frontend-base/src/logging/LogRecorder.kt @@ -18,9 +18,9 @@ import net.mamoe.mirai.console.frontendbase.FrontendBase import net.mamoe.mirai.console.util.AnsiMessageBuilder.Companion.dropAnsi import net.mamoe.mirai.utils.childScope import java.io.Writer -import java.nio.file.Files -import java.nio.file.Path -import java.nio.file.StandardOpenOption +import com.llamalab.safs.Files +import com.llamalab.safs.Path +import com.llamalab.safs.StandardOpenOption import java.time.Instant import java.time.ZoneId import java.time.format.DateTimeFormatter diff --git a/mirai-console/frontend/mirai-console-terminal/src/MiraiConsoleImplementationTerminal.kt b/mirai-console/frontend/mirai-console-terminal/src/MiraiConsoleImplementationTerminal.kt index cb7a3b78cb..f99002d254 100644 --- a/mirai-console/frontend/mirai-console-terminal/src/MiraiConsoleImplementationTerminal.kt +++ b/mirai-console/frontend/mirai-console-terminal/src/MiraiConsoleImplementationTerminal.kt @@ -56,8 +56,8 @@ import org.jline.reader.impl.completer.NullCompleter import org.jline.terminal.Terminal import org.jline.terminal.TerminalBuilder import org.jline.terminal.impl.AbstractWindowsTerminal -import java.nio.file.Path -import java.nio.file.Paths +import com.llamalab.safs.Path +import com.llamalab.safs.Paths /** * mirai-console-terminal 后端实现 diff --git a/mirai-console/tools/intellij-plugin/src/diagnostics/TaskUtils.kt b/mirai-console/tools/intellij-plugin/src/diagnostics/TaskUtils.kt index 4731439423..84f93b4958 100644 --- a/mirai-console/tools/intellij-plugin/src/diagnostics/TaskUtils.kt +++ b/mirai-console/tools/intellij-plugin/src/diagnostics/TaskUtils.kt @@ -15,7 +15,7 @@ import com.intellij.openapi.vfs.VfsUtil import com.intellij.openapi.vfs.VirtualFile import com.intellij.util.io.writeChild import org.intellij.lang.annotations.Language -import java.nio.file.Path +import com.llamalab.safs.Path val Path.vfOrNull: VirtualFile? get() = LocalFileSystem.getInstance().refreshAndFindFileByPath(this.toAbsolutePath().toString())