Commit d29c0102 authored by Romain Reuillon's avatar Romain Reuillon

Add write methodAdd write method.

parent 4205964b
......@@ -46,6 +46,13 @@ package object effectaside {
try f(is)
finally is.close
}
def writeStream[T](path: Path)(f: java.io.OutputStream => T) = {
import java.io._
val is = new BufferedOutputStream(new FileOutputStream(path.path))
try f(is)
finally is.close
}
}
object IO {
......
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