How to Write Raw Bytes to Disk

via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Feb 10 03:05:02 PST 2015


On Tuesday, 10 February 2015 at 11:03:06 UTC, Per Nordlöw wrote:
> How do I write a byte[] in raw (unformatted) format to disk?
>
>     File("f.raw", "wb").write(x)
>
> doesn't seem to do it.
>
> Why isn't the "wb" interpreted as raw bytes?

Oops, I just discovered

      File("f.raw", "wb").rawWrite(x)

.


More information about the Digitalmars-d-learn mailing list