pub fn sliceToPrefixedFileW(dir: ?windows.HANDLE, path: []const u8, options: Wtf16ToPrefixedFileWOptions) Wtf8ToPrefixedFileWError!WindowsPathSpace dir: ?windows.HANDLEpath: []const u8options: Wtf16ToPrefixedFileWOptions6880
6881
6882
6883
6884
6885
6886
6887pub fn sliceToPrefixedFileW(dir: ?windows.HANDLE, path: []const u8, options: Wtf16ToPrefixedFileWOptions) Wtf8ToPrefixedFileWError!WindowsPathSpace {
var temp_path: WindowsPathSpace = undefined;
temp_path.len = std.unicode.wtf8ToWtf16Le(&temp_path.data, path) catch |err| switch (err) {
error.InvalidWtf8 => return error.BadPathName,
};
temp_path.data[temp_path.len] = 0;
return wToPrefixedFileW(dir, temp_path.span(), options);
}
Same as
wToPrefixedFileWbut accepts a WTF-8 encoded path. https://wtf-8.codeberg.page/