DoxigAlpha

flush

Function parameters

Parameters

#
af:*AtomicFile

Note that the `Dir.atomicFile` API may be more handy than this lower-level function.

Functions

#
init
Note that the `Dir.atomicFile` API may be more handy than this lower-level function.
deinit
Always call deinit, even after a successful finish().
renameIntoPlace
On Windows, this function introduces a period of time where some file
finish
Combination of `flush` followed by `renameIntoPlace`.

Error sets in this namespace

Error Sets

#

Source

Implementation

#
pub fn flush(af: *AtomicFile) FlushError!void {
    af.file_writer.interface.flush() catch |err| switch (err) {
        error.WriteFailed => return af.file_writer.err.?,
    };
}