إدخال وإخراج الملفات (File I/O)
توفر مكتبة Zig القياسية عمليات عالية الأداء للملفات.
zig const file = try std.fs.cwd().createFile("test.txt", .{}); defer file.close();
try file.writeAll("Zig is fast!");
لقراءة ملف: zig const content = try std.fs.cwd().readFileAlloc(allocator, "test.txt", 1024 * 1024); defer allocator.free(content);