authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-06-25 15:56:37 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-06-25 15:56:37 -07:00
log4899f990d79d506ad2b6051c73fdcd8638dfef09
treeb774bb3eaab7982b556e7e1211c450375d785815
parent073d0debe593245c192e9f5ce595fac29494c9c4
signaturebadge-check Signed by SSH key SHA256:4hHJbtBRU58AYXwjL7fkz2fnQHdiye8x1QpTCQ0sHNw

Mode: add octal


1 files changed, 14 insertions(+), 0 deletions(-)

git.zig+14
......@@ -1814,6 +1814,20 @@ pub const Tree = struct {
18141814 b[5] = @as(u8, @as(u3, @bitCast(self.perm_other))) + '0';
18151815 return b;
18161816 }
1817
1818 pub fn octal(self: Mode) u9 {
1819 const O = packed struct {
1820 other: Perm,
1821 group: Perm,
1822 user: Perm,
1823 };
1824 const o: O = .{
1825 .other = self.perm_other,
1826 .group = self.perm_group,
1827 .user = self.perm_user,
1828 };
1829 return @bitCast(o);
1830 }
18171831 };
18181832
18191833 pub const Type = enum(u8) {