iopipe: Writing output to std.io File

Jesse Phillips Jesse.K.Phillips+D at gmail.com
Mon Jan 27 04:59:39 UTC 2020


On Monday, 27 January 2020 at 01:50:00 UTC, Jesse Phillips wrote:
> Just as I'm hitting send the part I'm missing clicked:
>
> I needed to add the text encoding because my buffer is `char` 
> but File writes `ubyte`
>
> ```dlang
>     auto output() {
>         return std.io.File("somefile.txt", mode!"w").refCounted;
>     }
>     auto outputBuffered = bufd!char
>         .encodeText // Missing This part
>         .outputPipe(output());
> }
> ```

Unfortunately this did not write a text file as I expected.


More information about the Digitalmars-d-learn mailing list