Open
Description
Zig Version
0.10.0-dev.3922+b98b3252b
Steps to Reproduce
On POSIX-based OS, this succeeds. On Windows, this fails.
const std = @import("std");
const assert = std.debug.assert;
pub fn main() !void {
const file = try std.fs.cwd().createFile("dummy", .{});
defer file.close();
try file.seekBy(10);
const curr_pos = try file.getPos();
assert(curr_pos == 10);
try file.pwriteAll("\xaa", 0);
assert(curr_pos == try file.getPos());
}
Expected Behavior
My question is: should we strive for File.pwrite/pread
(and related) to be platform-independent? My gut is telling me yes but I want to see what others think about this.
Actual Behavior
Currently, File.pwrite/pread
(and related) are platform-dependent.