pub fn createFileAtomic(
dir: Dir,
io: Io,
sub_path: []const u8,
options: CreateFileAtomicOptions,
) CreateFileAtomicError!File.Atomic dir: Dirio: Iosub_path: []const u8options: CreateFileAtomicOptions1928
1929
1930
1931
1932
1933
1934
1935pub fn createFileAtomic(
dir: Dir,
io: Io,
sub_path: []const u8,
options: CreateFileAtomicOptions,
) CreateFileAtomicError!File.Atomic {
return io.vtable.dirCreateFileAtomic(io.userdata, dir, sub_path, options);
}
Create an unnamed ephemeral file that can eventually be atomically materialized into
sub_path.The returned
File.Atomicprovides API to emulate the behavior in case it is not directly supported by the underlying operating system.sub_pathshould be encoded as WTF-8.sub_pathshould be encoded as valid UTF-8.sub_pathis an opaque sequence of bytes with no particular encoding.