FileIO Class |
Namespace: Akka.Streams.Dsl
The FileIO type exposes the following members.
Name | Description | |
---|---|---|
FromFile |
Creates a Source from a Files contents.
Emitted elements are chunkSize sized ByteString elements,
except the final element, which will be up to chunkSize in size.
You can configure the default dispatcher for this Source by changing the "akka.stream.blocking-io-dispatcher" or
set it for a given Source by using ActorAttributes.
It materializes a TaskTResult of IOResult containing the number of bytes read from the source file upon completion,
and a possible exception if IO operation was not completed successfully.
| |
ToFile |
Creates a Sink which writes incoming ByteString elements to the given file and either overwrites
or appends to it.
Materializes a TaskTResult of IOResult that will be completed with the size of the file(in bytes) at the streams completion,
and a possible exception if IO operation was not completed successfully.
This source is backed by an Actor which will use the dedicated "akka.stream.blocking-io-dispatcher",
unless configured otherwise by using ActorAttributes.
|