authorgravatar for nils.juto@posteo.seNils Juto <nils.juto@posteo.se> 2026-10-07 14:22:00+02:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2026-10-09 15:52:06-07:00
log2c276c2c753db70b43fadf7d77a3f460008f320c
treee2223c7f23174d3975c367f6f7f86eb773c6a388
parent6413c1bf213eb18165142e99f49d63c5f713d287

document `File.Atomic.sub_path` lifetime requirement


1 files changed, 2 insertions(+), 1 deletions(-)

lib/std/Io/Dir.zig+2-1
......@@ -1917,7 +1917,8 @@ pub const CreateFileAtomicError = error{
19171917} || Io.Dir.PathNameError || Io.Cancelable || Io.UnexpectedError;
19181918
19191919/// Create an unnamed ephemeral file that can eventually be atomically
1920/// materialized into `sub_path`.
1920/// materialized into `sub_path`. `sub_path` must be valid until the atomic
1921/// file is materialized.
19211922///
19221923/// The returned `File.Atomic` provides API to emulate the behavior in case it
19231924/// is not directly supported by the underlying operating system.