Function access [src]
Prototype
pub fn access(p: Path, sub_path: []const u8, flags: fs.File.OpenFlags) !void
Parameters
p: Path
sub_path: []const u8
flags: fs.File.OpenFlags
Source
pub fn access(p: Path, sub_path: []const u8, flags: fs.File.OpenFlags) !void {
var buf: [fs.max_path_bytes]u8 = undefined;
const joined_path = if (p.sub_path.len == 0) sub_path else p: {
break :p std.fmt.bufPrint(&buf, "{s}" ++ fs.path.sep_str ++ "{s}", .{
p.sub_path, sub_path,
}) catch return error.NameTooLong;
};
return p.root_dir.handle.access(joined_path, flags);
}