fn realPathWindowsBuf(h_file: windows.HANDLE, out_buffer: []u8, wtf16_buffer: []u16) File.RealPathError!usize h_file: windows.HANDLEout_buffer: []u8wtf16_buffer: []u166337
6338
6339
6340
6341
6342
6343
6344
6345fn realPathWindowsBuf(h_file: windows.HANDLE, out_buffer: []u8, wtf16_buffer: []u16) File.RealPathError!usize {
const wide_slice = try GetFinalPathNameByHandle(h_file, .{}, wtf16_buffer);
const len = std.unicode.calcWtf8Len(wide_slice);
if (len > out_buffer.len)
return error.NameTooLong;
return std.unicode.wtf16LeToWtf8(out_buffer, wide_slice);
}