aboutsummaryrefslogtreecommitdiff
path: root/src/bun.js/node/syscall.zig
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2022-10-03 01:10:38 -0700
committerGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2022-10-03 01:10:38 -0700
commitd3ef6c330ab178026b9a9f447ed165832c99e358 (patch)
treec461c496540a621cf69a64049fad777cf468c354 /src/bun.js/node/syscall.zig
parent47007621326c5537b9d5d2a11eaa7dc086fc6a82 (diff)
downloadbun-d3ef6c330ab178026b9a9f447ed165832c99e358.tar.gz
bun-d3ef6c330ab178026b9a9f447ed165832c99e358.tar.zst
bun-d3ef6c330ab178026b9a9f447ed165832c99e358.zip
`node:fs` implement `rm` on macOS
no linux yet
Diffstat (limited to 'src/bun.js/node/syscall.zig')
-rw-r--r--src/bun.js/node/syscall.zig4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/bun.js/node/syscall.zig b/src/bun.js/node/syscall.zig
index d677a4510..fddd0a8df 100644
--- a/src/bun.js/node/syscall.zig
+++ b/src/bun.js/node/syscall.zig
@@ -566,6 +566,10 @@ pub const Error = struct {
syscall: Syscall.Tag = @intToEnum(Syscall.Tag, 0),
path: []const u8 = "",
+ pub inline fn isRetry(this: *const Error) bool {
+ return this.getErrno() == .AGAIN;
+ }
+
pub fn fromCode(errno: os.E, syscall: Syscall.Tag) Error {
return .{ .errno = @truncate(Int, @enumToInt(errno)), .syscall = syscall };
}