Emits the contents of a file.

File IO Sinks and Sources


The fromFile operator has been deprecated, use fromPath instead.


def fromFile(f: File, chunkSize: Int = 8192): Source[ByteString, Future[IOResult]]


Emits the contents of a file, as ByteStrings, materializes into a Future CompletionStage which will be completed with a IOResult upon reaching the end of the file or if there is a failure.

Found an error in this documentation? The source code for this page can be found here. Please feel free to edit and contribute a pull request.