View source code
Display the source code in std/stdio.d from which this page was generated on github.
Report a bug
If you spot a problem with this page, click here to create a Bugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page. Requires a signed-in GitHub account. This works well for small changes. If you'd like to make larger changes you may want to consider using local clone.

Function std.stdio.File.reopen

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.

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

Note

Calling reopen with a null name is not implemented in all C runtimes.

Throws

ErrnoException in case of error.

Authors

Walter Bright, Andrei Alexandrescu, Alex Rønne Petersen

License

Boost License 1.0.