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 21:15:09+02:00
log06efbc37cb777907178217e8f994737736b27b74
tree67a86aca57ffb4474f7b7248312a5f1cbca3002a
parent853558b6da7016d502a8aa784d217ddbf144fdcf

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.