Re: Copying an std.stdio.File into another one

2018-05-21 Thread rikki cattermole via Digitalmars-d-learn
On 21/05/2018 11:50 PM, 0xEAB wrote: What's the correct way to copy a `File` into another one in D? If `LockingTextReader` wasn't undocumented, I'd have gone for that approach: import std.algorithm.mutation : copy; import std.stdio : File, LockingTextReader; void main() {     auto a =

Copying an std.stdio.File into another one

2018-05-21 Thread 0xEAB via Digitalmars-d-learn
What's the correct way to copy a `File` into another one in D? If `LockingTextReader` wasn't undocumented, I'd have gone for that approach: import std.algorithm.mutation : copy; import std.stdio : File, LockingTextReader; void main() { auto a = File("a.txt", "r"); auto b =