I/O extensions for common tasks
schveiguy at gmail.com
Mon Dec 10 14:44:56 UTC 2018
On 12/9/18 9:37 PM, Seb wrote:
> On Monday, 10 December 2018 at 01:51:56 UTC, Andrew Pennebaker wrote:
>> The stdlib has all the low-level components we need to do lots of
>> different workflows. However, there are a few gaps in the API in terms
>> of high level, common tasks. For example, the API can read an entire
>> Unicode text file to a string for a given filename, but not for a
>> given File object!
> What's wrong with readText:
Problem statement is that given a File object, how do you read all the
data out? :) std.file doesn't help there.
BTW, if you were using iopipe, the answer would be:
pipe.ensureElems(); // read all elements into the buffer 
auto data = pipe.window; // get all the elements as an array.
More information about the Digitalmars-d