| ... | ... | @@ -2003,10 +2003,12 @@ pub const Dir = struct { |
| 2003 | 2003 | return os.windows.CreateSymbolicLink(self.fd, sym_link_path_w, target_path_w, flags.is_directory); |
| 2004 | 2004 | } |
| 2005 | 2005 | |
| 2006 | pub const ReadLinkError = os.ReadLinkError; |
| 2007 | |
| 2006 | 2008 | /// Read value of a symbolic link. |
| 2007 | 2009 | /// The return value is a slice of `buffer`, from index `0`. |
| 2008 | 2010 | /// Asserts that the path parameter has no null bytes. |
| 2009 | | 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 { |
| 2010 | 2012 | if (builtin.os.tag == .wasi and !builtin.link_libc) { |
| 2011 | 2013 | return self.readLinkWasi(sub_path, buffer); |
| 2012 | 2014 | } |