diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2025-12-08 15:42:42 -0800 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2025-12-23 22:15:08 -0800 |
| commit | 7f5bb118d4d90e2b883ee66e17592ac8d7808ac8 (patch) | |
| tree | a9ea1f3ad962cdfb7597b6e1a1d89982f7199c35 /lib/std/Io/File.zig | |
| parent | 6f46570958af8ae27308eb4a9470e05f33aaa522 (diff) | |
| download | zig-7f5bb118d4d90e2b883ee66e17592ac8d7808ac8.tar.gz zig-7f5bb118d4d90e2b883ee66e17592ac8d7808ac8.zip | |
std.Io: make all the close functions batched
Diffstat (limited to 'lib/std/Io/File.zig')
| -rw-r--r-- | lib/std/Io/File.zig | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/std/Io/File.zig b/lib/std/Io/File.zig index 5e89025478..302d2a8ca5 100644 --- a/lib/std/Io/File.zig +++ b/lib/std/Io/File.zig @@ -252,7 +252,11 @@ pub const OpenError = error{ } || Io.Dir.PathNameError || Io.Cancelable || Io.UnexpectedError; pub fn close(file: File, io: Io) void { - return io.vtable.fileClose(io.userdata, file); + return io.vtable.fileClose(io.userdata, (&file)[0..1]); +} + +pub fn closeMany(io: Io, files: []const File) void { + return io.vtable.fileClose(io.userdata, files); } pub const SyncError = error{ |
