Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
import monix.reactive.Observable
object FileReader {
def fileObservable(files: Seq[String]): Observable[String] = {
Observable.fromIterable(files).flatMap({ file =>
Observable.fromLinesReader(new BufferedReader(new InputStreamReader(new FileInputStream(file))))
.doOnSubscribe(() => println(s"START [$file]"))
.doOnComplete(() => println(s"FINISH [$file]"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment