We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a435298 commit 309c532Copy full SHA for 309c532
lib/std/fs.zig
@@ -2003,10 +2003,12 @@ pub const Dir = struct {
2003
return os.windows.CreateSymbolicLink(self.fd, sym_link_path_w, target_path_w, flags.is_directory);
2004
}
2005
2006
+ pub const ReadLinkError = os.ReadLinkError;
2007
+
2008
/// Read value of a symbolic link.
2009
/// The return value is a slice of `buffer`, from index `0`.
2010
/// Asserts that the path parameter has no null bytes.
- pub fn readLink(self: Dir, sub_path: []const u8, buffer: []u8) ![]u8 {
2011
+ pub fn readLink(self: Dir, sub_path: []const u8, buffer: []u8) ReadLinkError![]u8 {
2012
if (builtin.os.tag == .wasi and !builtin.link_libc) {
2013
return self.readLinkWasi(sub_path, buffer);
2014
0 commit comments