diff options
author | Jakob Odersky <jakob@odersky.com> | 2017-03-06 01:47:50 -0800 |
---|---|---|
committer | Jakob Odersky <jakob@odersky.com> | 2017-03-06 01:47:50 -0800 |
commit | bd7083167c1a0899f722971fb90ce41c96de252f (patch) | |
tree | e0bcad925419f1801caa2d2cd8270417c7a5b2e8 /crashbox-server/src/main/scala/io/crashbox/ci/StreamStore.scala | |
parent | 374ac0ce8c10e9063c263ecf9c708f9ee6772973 (diff) | |
download | crashbox-ci-bd7083167c1a0899f722971fb90ce41c96de252f.tar.gz crashbox-ci-bd7083167c1a0899f722971fb90ce41c96de252f.tar.bz2 crashbox-ci-bd7083167c1a0899f722971fb90ce41c96de252f.zip |
scalafmt
Diffstat (limited to 'crashbox-server/src/main/scala/io/crashbox/ci/StreamStore.scala')
-rw-r--r-- | crashbox-server/src/main/scala/io/crashbox/ci/StreamStore.scala | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/crashbox-server/src/main/scala/io/crashbox/ci/StreamStore.scala b/crashbox-server/src/main/scala/io/crashbox/ci/StreamStore.scala index 5fd3769..bba3cdf 100644 --- a/crashbox-server/src/main/scala/io/crashbox/ci/StreamStore.scala +++ b/crashbox-server/src/main/scala/io/crashbox/ci/StreamStore.scala @@ -1,15 +1,24 @@ package io.crashbox.ci -import java.io.{ File, FileInputStream, FileOutputStream, InputStream, OutputStream } +import java.io.{ + File, + FileInputStream, + FileOutputStream, + InputStream, + OutputStream +} import java.security.MessageDigest trait StreamStore { self: Core => - val streamsDirectory: File = new File(config.getString("crashbox.streams.directory")) + val streamsDirectory: File = new File( + config.getString("crashbox.streams.directory")) private def logFile(id: String): File = { val bytes = MessageDigest.getInstance("SHA-256").digest(id.getBytes) - val str = bytes.map{byte => Integer.toString((byte & 0xff) + 0x100, 16)}.mkString + val str = bytes.map { byte => + Integer.toString((byte & 0xff) + 0x100, 16) + }.mkString val (head, tail) = str.splitAt(2) new File(streamsDirectory, s"$head/$tail") } |