File.reopen

void reopen(string name, scope const(char)[] stdioOpenmode = "rb") @trusted

Reuses the File object to either open a different file, or change the file mode. If name is null, the mode of the currently open file is changed; otherwise, a new file is opened, reusing the C FILE*. The function has the same semantics as in the C standard library freopen function.

Note

Calling reopen with a null name is not implemented

in all C runtimes.

Throws

ErrnoException in case of error.