Files
zig/test/standalone/run_cwd/check_file_exists.zig
T
Andrew Kelley 80625990d5 std: different mechanism for disabling network dependency
On Windows, it is sometimes problematic to depend on ws2_32.dll. Before,
users of std.Io.Threaded would have to call ioBasic() rather than io()
in order to avoid unnecessary dependencies on ws2_32.dll. Now, the
application can disable networking with std.Options.

This change is necessary due to moving networking functionality to
be based on Io.Operation, which is a tagged union.
2026-03-08 19:20:34 -07:00

14 lines
383 B
Zig

pub fn main(init: std.process.Init) !void {
const arena = init.arena.allocator();
const args = try init.minimal.args.toSlice(arena);
if (args.len != 2) return error.BadUsage;
const path = args[1];
const io = std.Io.Threaded.global_single_threaded.io();
std.Io.Dir.cwd().access(io, path, .{}) catch return error.AccessFailed;
}
const std = @import("std");