=htc, doc replace usages of deprecated methods of FileIO (#20928)

This commit is contained in:
Nafer Sanabria 2016-07-10 10:41:57 -05:00 committed by Konrad Malawski
parent c81ea4f36b
commit 32810e1f1d
12 changed files with 34 additions and 26 deletions

View file

@ -35,7 +35,7 @@ class FileUploadExamplesSpec extends RoutingSpec {
// stream into a file as the chunks of it arrives and return a future
// file to where it got stored
val file = File.createTempFile("upload", "tmp")
b.entity.dataBytes.runWith(FileIO.toFile(file)).map(_ =>
b.entity.dataBytes.runWith(FileIO.toPath(file.toPath)).map(_ =>
(b.name -> file))
case b: BodyPart =>

View file

@ -138,8 +138,8 @@ IO Sources / Sinks materialize IOResult
Materialized values of the following sources and sinks:
* ``FileIO.fromFile``
* ``FileIO.toFile``
* ``FileIO.fromPath``
* ``FileIO.toPath``
* ``StreamConverters.fromInputStream``
* ``StreamConverters.fromOutputStream``

View file

@ -100,7 +100,7 @@ Akka Streams provide simple Sources and Sinks that can work with :class:`ByteStr
on files.
Streaming data from a file is as easy as creating a `FileIO.fromFile` given a target file, and an optional
Streaming data from a file is as easy as creating a `FileIO.fromPath` given a target path, and an optional
``chunkSize`` which determines the buffer size determined as one "element" in such stream:
.. includecode:: ../code/docs/stream/io/StreamFileDocSpec.scala#file-source

View file

@ -91,7 +91,7 @@ accepts strings as its input and when materialized it will create auxiliary
information of type ``Future[IOResult]`` (when chaining operations on
a :class:`Source` or :class:`Flow` the type of the auxiliary information—called
the “materialized value”—is given by the leftmost starting point; since we want
to retain what the ``FileIO.toFile`` sink has to offer, we need to say
to retain what the ``FileIO.toPath`` sink has to offer, we need to say
``Keep.right``).
We can use the new and shiny :class:`Sink` we just created by