toFile

fnvoid toFile(T)(T data, string fileName) if (is(typeof(copy(data, stdout.lockingBinaryWriter))))

Writes an array or range to a file. Shorthand for data.copy(File(fileName, "wb").lockingBinaryWriter). Similar to write, strings are written as-is, rather than encoded according to the File's orientation.