authorgravatar for michael@pfaff.devMichael Pfaff <michael@pfaff.dev> 2025-04-23 10:32:21-04:00
committergravatar for squeek502@hotmail.comRyan Liptak <squeek502@hotmail.com> 2025-10-08 17:07:38-07:00
log2886a8bf45d3e340282c7f0dc8b35455e935f0b2
tree89ee9ec163851b6944f7d146dfbfec60679b9e04
parentf2227ae6776112f952f7db1c0a0eb2a0a27cf576

Improve documentation on Dir.realpathW


1 files changed, 7 insertions(+), 2 deletions(-)

lib/std/fs/Dir.zig+7-2
...@@ -1428,8 +1428,13 @@ pub fn realpathZ(self: Dir, pathname: [*:0]const u8, out_buffer: []u8) RealPathE...@@ -1428,8 +1428,13 @@ pub fn realpathZ(self: Dir, pathname: [*:0]const u8, out_buffer: []u8) RealPathE
1428 return result;1428 return result;
1429}1429}
14301430
1431/// Windows-only. Same as `Dir.realpath` except `pathname` is WTF16 LE encoded.1431/// Windows-only. Same as `Dir.realpath` except
1432/// The result is encoded as WTF16 LE.1432/// * `pathname` and the result are WTF-16 LE encoded
1433/// * `pathname` is relative or has the NT namespace prefix. See `windows.wToPrefixedFileW` for details.
1434///
1435/// Additionally, `pathname` will never be accessed after `out_buffer` has been written to, so it
1436/// is safe to reuse a single buffer for both.
1437///
1433/// See also `Dir.realpath`, `realpathW`.1438/// See also `Dir.realpath`, `realpathW`.
1434pub fn realpathW(self: Dir, pathname: []const u16, out_buffer: []u16) RealPathError![]u16 {1439pub fn realpathW(self: Dir, pathname: []const u16, out_buffer: []u16) RealPathError![]u16 {
1435 const w = windows;1440 const w = windows;