From 46fbbbb8a10138cc296c5e1e28ea870127ece91f Mon Sep 17 00:00:00 2001 From: RPiList <56664851+RPiList@users.noreply.github.com> Date: Sun, 24 Oct 2021 21:02:41 +0200 Subject: [PATCH] Update TarpitAn --- TarpitAn | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/TarpitAn b/TarpitAn index d050eff..e7b62b1 100644 --- a/TarpitAn +++ b/TarpitAn @@ -28,12 +28,11 @@ var message6 = " Process finished. \r" fun main() { - println(message3) - val inputStream2: InputStream = File(path + "\\" + fileName).inputStream() + val inputStream2: InputStream = File(path + File.separator + fileName).inputStream() inputStream2.bufferedReader().forEachLine { Liste5.add(it) } - val inputStream: InputStream = File(path + "\\" + fileName2).inputStream() + val inputStream: InputStream = File(path + File.separator + fileName2).inputStream() inputStream.bufferedReader().forEachLine { lineList.add(it) } lineList.forEach { datenaufbereitung(it) } @@ -89,7 +88,7 @@ fun analyse(){ val anzahlzeilen: Int = Liste1.count() -1 try { - val fw = FileWriter(path + "\\" + fileName3, true) + val fw = FileWriter(path + File.separator + fileName3, true) for (i in 0..anzahlzeilen) { @@ -183,9 +182,8 @@ fun analyse(){ "Average: " + zeit3 + System.getProperty("line.separator") + "Longest in Tarpit: " + zeit4 + System.getProperty("line.separator") + "Shortest in Tarpit: " + sekundenshortest.toString() - try { - val fw = FileWriter(path + "\\" + fileName4, true) + val fw = FileWriter(path + File.separator + fileName4, true) fw.write(text) fw.close() } catch (e: IOException) {