Is there a function that reads the entire contents of a std.stdio.File?
Jay via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Tue Sep 16 11:32:14 PDT 2014
On Tuesday, 16 September 2014 at 16:54:17 UTC, Ali Çehreli wrote:
> On 09/16/2014 07:37 AM, Jay wrote:
>> all the functions/methods i've come across so far deal with
>> either
>> streams or just file names (like std.file.read) and there
>> doesn't seem
>> to be a way to wrap a std.stdio.File in a stream (or is
>> there?). i need
>> a function that takes a std.stdio.File and returns a string or
>> byte array.
>
> std.file.read (and readText):
>
> http://dlang.org/phobos/std_file.html#.read
>
> Ali
wait, std.file.read doesn't accept a File instance. i've got a
File instance generated by another function and now i need to
read the entire contents of whatever it represents (a regular
file/pipe/etc).
More information about the Digitalmars-d-learn
mailing list