diff options
Diffstat (limited to 'src/fs.zig')
| -rw-r--r-- | src/fs.zig | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -726,7 +726,9 @@ fn readFileLimit(gpa: std.mem.Allocator, path: []const u8, limit: usize) ![]u8 { return pardes.tape.site(.read_file, gpa, readHost, .{ gpa, path_z, limit }); } -fn readHost(gpa: std.mem.Allocator, path_z: [:0]const u8, limit: usize) ![]u8 { +/// The disk's file at `path_z`, whole: the session's read, and a replica +/// client's of a read it was sent by hash (tape.zig `byHash`). +pub fn readHost(gpa: std.mem.Allocator, path_z: [:0]const u8, limit: usize) ![]u8 { const fd = libc.open(path_z, .{ .ACCMODE = .RDONLY, .NONBLOCK = true }); if (fd < 0) return switch (libc.errno(fd)) { .ACCES, .PERM => error.PermissionDenied, |
