diff --git a/src/io/source.zig b/src/io/source.zig index b0abf10a45..9ea0e70df5 100644 --- a/src/io/source.zig +++ b/src/io/source.zig @@ -13,6 +13,7 @@ pub const Source = union(enum) { const Tty = uv.uv_tty_t; const File = struct { fs: uv.fs_t, + iov: uv.uv_buf_t, file: uv.uv_file, }; @@ -79,22 +80,6 @@ pub const Source = union(enum) { } } - pub fn isClosed(this: Source) bool { - switch (this) { - .pipe => |pipe| return pipe.isClosed(), - .tty => |tty| return tty.isClosed(), - .file => |file| return file.file == -1, - } - } - - pub fn isActive(this: Source) bool { - switch (this) { - .pipe => |pipe| return pipe.isActive(), - .tty => |tty| return tty.isActive(), - .file => return false, - } - } - pub fn openPipe(loop: *uv.Loop, fd: bun.FileDescriptor, ipc: bool) bun.JSC.Maybe(*Source.Pipe) { log("openPipe (fd = {})", .{fd}); const pipe = bun.default_allocator.create(Source.Pipe) catch bun.outOfMemory();