Output range for file?

H. S. Teoh via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun Jan 24 07:08:33 PST 2016


On Sun, Jan 24, 2016 at 12:38:22PM +0000, Tofu Ninja via Digitalmars-d-learn wrote:
> I tried looking for this in phobos but cant seem to find it which is
> really annoying. For my uses this works:

What kind of data do you need to write to file?  If it's textual data,
use File.lockingTextWriter, which is an output range.

If it's binary data, you'll probably have to roll your own; there's a
Phobos PR right now that implements File.lockingBinaryWriter, but it's
not quite ready for merging yet.


T

-- 
Real men don't take backups. They put their source on a public FTP-server and let the world mirror it. -- Linus Torvalds


More information about the Digitalmars-d-learn mailing list