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.lockingTextWriter
Output range which locks the file when created, and unlocks the file when it goes out of scope.
std .stdio .File .LockingTextWriter lockingTextWriter() @safe;
Returns
An output range
which accepts string types, ubyte[]
, individual character types, and
individual ubyte
s.
Note
Writing either arrays of char
s or ubyte
s is faster than
writing each character individually from a range. For large amounts of data,
writing the contents in chunks using an intermediary array can result
in a speed increase.
Throws
UTFException
if the data given is a char
range
and it contains malformed UTF data.
See Also
byChunk
for an example.
Authors
Walter Bright, Andrei Alexandrescu, Alex Rønne Petersen
License
Copyright © 1999-2022 by the D Language Foundation | Page generated by ddox.