Skip to content

Instantly share code, notes, and snippets.

View antoniomaria's full-sized avatar

Antonio Maria Sanchez Berrocal antoniomaria

View GitHub Profile
@tovbinm
tovbinm / FileAsyncIO.scala
Last active March 15, 2021 10:43
File Async IO for Scala
import java.io.IOException
import java.nio.ByteBuffer
import java.nio.channels.{AsynchronousFileChannel, CompletionHandler}
import java.nio.file.Paths
import java.nio.file.StandardOpenOption._
import scala.concurrent.{ExecutionContext, Future, Promise}
import scala.util.Try
/**