Commit 8a561f80 by Amelin Konstantin

remove transform stream to array

parent a489d3b7
...@@ -179,13 +179,13 @@ object Main { ...@@ -179,13 +179,13 @@ object Main {
StandardOpenOption.CREATE, StandardOpenOption.CREATE,
StandardOpenOption.TRUNCATE_EXISTING) StandardOpenOption.TRUNCATE_EXISTING)
if (Files.list(sourceValidated.get).toArray.nonEmpty) if (Files.list(sourceValidated.get).iterator.asScala.nonEmpty)
Files.copy(Paths.get(args(0), logFileName), Paths.get(sourceNameValidated, logFileName)) Files.copy(Paths.get(args(0), logFileName), Paths.get(sourceNameValidated, logFileName))
else else
Files.delete(sourceValidated.get) Files.delete(sourceValidated.get)
if (Files.list(sourceNotValidated.get).toArray.isEmpty) Files.delete(sourceNotValidated.get) if (Files.list(sourceNotValidated.get).iterator.asScala.isEmpty) Files.delete(sourceNotValidated.get)
if (Files.list(sourceError.get).toArray.isEmpty) Files.delete(sourceError.get) if (Files.list(sourceError.get).iterator.asScala.isEmpty) Files.delete(sourceError.get)
} match { } match {
case Success(_) => println(s"Converting has been finished. $logFileName located in ${args(0)}") case Success(_) => println(s"Converting has been finished. $logFileName located in ${args(0)}")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment