authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2025-12-28 22:18:44 -08:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2025-12-28 22:18:44 -08:00
logcf9642a62718e1275e7ff2b3aad7c62345cadccd
tree9844c689c66fdd18a291ad72be55356bfe5eb3cf
parentc6cc82e302b6829b10eaa9b21495bc776e1c73d3

Dir: add statFile


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

Dir.zig+5
...@@ -58,3 +58,8 @@ pub fn makeDir(self: Dir, sub_path: [:0]const u8) !void {...@@ -58,3 +58,8 @@ pub fn makeDir(self: Dir, sub_path: [:0]const u8) !void {
58 if (os == .linux)58 if (os == .linux)
59 try sys_linux.mkdirat(@intFromEnum(self.fd), sub_path, 0o755);59 try sys_linux.mkdirat(@intFromEnum(self.fd), sub_path, 0o755);
60}60}
61
62pub fn statFile(self: Dir, sub_path: [:0]const u8) !File.Stat {
63 if (os == .linux)
64 return .fromPosix(try sys_linux.fstatat(@intFromEnum(self.fd), sub_path, 0));
65}