Skip to content

Instantly share code, notes, and snippets.

@Vilkina
Created March 27, 2020 13:16
Show Gist options
  • Save Vilkina/bd716370babcc308777aa5999608d62a to your computer and use it in GitHub Desktop.
Save Vilkina/bd716370babcc308777aa5999608d62a to your computer and use it in GitHub Desktop.
def copyChunk(from: AsynchronousFileChannel,
to : AsynchronousFileChannel) =
for {
chunk <- from.read(1024, 0)
_ <- to.write(chunk, 0)
} yield ()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment