www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - tango.io.FileConduit-readlines one at a time

reply Tower Ty <tytower hotmail.com.au> writes:
The comments on Conduit are as below but can I read a line at a time?

// open file for reading
        auto fc = new FileConduit ("test.txt");

        // create an array to house the entire file
        auto content = new char[fc.length];

        // read the file content. Return value is the number of bytes read
        auto bytesRead = fc.input.read (content);
Mar 23 2008
parent e-t172 <e-t172 akegroup.org> writes:
Tower Ty a écrit :
 The comments on Conduit are as below but can I read a line at a time?

Take a look at LineStream. http://www.dsource.org/projects/tango/docs/current/tango.io.stream.LineStream.html
Mar 24 2008