aboutsummaryrefslogtreecommitdiff
path: root/lib/std/Io/File.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2025-12-08 15:42:42 -0800
committerAndrew Kelley <andrew@ziglang.org>2025-12-23 22:15:08 -0800
commit7f5bb118d4d90e2b883ee66e17592ac8d7808ac8 (patch)
treea9ea1f3ad962cdfb7597b6e1a1d89982f7199c35 /lib/std/Io/File.zig
parent6f46570958af8ae27308eb4a9470e05f33aaa522 (diff)
downloadzig-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.zig6
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{