summaryrefslogtreecommitdiff
path: root/src/fs.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/fs.zig')
-rw-r--r--src/fs.zig4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/fs.zig b/src/fs.zig
index 855beb25..47ee0856 100644
--- a/src/fs.zig
+++ b/src/fs.zig
@@ -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,