diff options
author | 2022-10-03 01:10:38 -0700 | |
---|---|---|
committer | 2022-10-03 01:10:38 -0700 | |
commit | d3ef6c330ab178026b9a9f447ed165832c99e358 (patch) | |
tree | c461c496540a621cf69a64049fad777cf468c354 /src/bun.js/node/syscall.zig | |
parent | 47007621326c5537b9d5d2a11eaa7dc086fc6a82 (diff) | |
download | bun-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.zig | 4 |
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 }; } |