| ... | @@ -2233,7 +2233,7 @@ pub fn mkdirZ(dir_path: [*:0]const u8, mode: u32) MakeDirError!void { | ... | @@ -2233,7 +2233,7 @@ pub fn mkdirZ(dir_path: [*:0]const u8, mode: u32) MakeDirError!void { |
| 2233 | } | 2233 | } |
| 2234 | } | 2234 | } |
| 2235 | | 2235 | |
| 2236 | /// Windows-only. Same as `mkdir` but the parameters is null-terminated, WTF16 encoded. | 2236 | /// Windows-only. Same as `mkdir` but the parameters is WTF16 encoded. |
| 2237 | pub fn mkdirW(dir_path_w: []const u16, mode: u32) MakeDirError!void { | 2237 | pub fn mkdirW(dir_path_w: []const u16, mode: u32) MakeDirError!void { |
| 2238 | const sub_dir_handle = windows.OpenFile(dir_path_w, .{ | 2238 | const sub_dir_handle = windows.OpenFile(dir_path_w, .{ |
| 2239 | .dir = std.fs.cwd().fd, | 2239 | .dir = std.fs.cwd().fd, |
| ... | @@ -2304,7 +2304,7 @@ pub fn rmdirZ(dir_path: [*:0]const u8) DeleteDirError!void { | ... | @@ -2304,7 +2304,7 @@ pub fn rmdirZ(dir_path: [*:0]const u8) DeleteDirError!void { |
| 2304 | } | 2304 | } |
| 2305 | } | 2305 | } |
| 2306 | | 2306 | |
| 2307 | /// Windows-only. Same as `rmdir` except the parameter is null-terminated, WTF16 encoded. | 2307 | /// Windows-only. Same as `rmdir` except the parameter is WTF16 encoded. |
| 2308 | pub fn rmdirW(dir_path_w: []const u16) DeleteDirError!void { | 2308 | pub fn rmdirW(dir_path_w: []const u16) DeleteDirError!void { |
| 2309 | return windows.DeleteFile(dir_path_w, .{ .dir = std.fs.cwd().fd, .remove_dir = true }) catch |err| switch (err) { | 2309 | return windows.DeleteFile(dir_path_w, .{ .dir = std.fs.cwd().fd, .remove_dir = true }) catch |err| switch (err) { |
| 2310 | error.IsDir => unreachable, | 2310 | error.IsDir => unreachable, |
| ... | @@ -2411,7 +2411,7 @@ pub fn readlink(file_path: []const u8, out_buffer: []u8) ReadLinkError![]u8 { | ... | @@ -2411,7 +2411,7 @@ pub fn readlink(file_path: []const u8, out_buffer: []u8) ReadLinkError![]u8 { |
| 2411 | | 2411 | |
| 2412 | pub const readlinkC = @compileError("deprecated: renamed to readlinkZ"); | 2412 | pub const readlinkC = @compileError("deprecated: renamed to readlinkZ"); |
| 2413 | | 2413 | |
| 2414 | /// Windows-only. Same as `readlink` except `file_path` is null-terminated, WTF16 encoded. | 2414 | /// Windows-only. Same as `readlink` except `file_path` is WTF16 encoded. |
| 2415 | /// See also `readlinkZ`. | 2415 | /// See also `readlinkZ`. |
| 2416 | pub fn readlinkW(file_path: []const u16, out_buffer: []u8) ReadLinkError![]u8 { | 2416 | pub fn readlinkW(file_path: []const u16, out_buffer: []u8) ReadLinkError![]u8 { |
| 2417 | return windows.ReadLink(std.fs.cwd().fd, file_path, out_buffer); | 2417 | return windows.ReadLink(std.fs.cwd().fd, file_path, out_buffer); |
| ... | @@ -4059,8 +4059,8 @@ pub fn realpathZ(pathname: [*:0]const u8, out_buffer: *[MAX_PATH_BYTES]u8) RealP | ... | @@ -4059,8 +4059,8 @@ pub fn realpathZ(pathname: [*:0]const u8, out_buffer: *[MAX_PATH_BYTES]u8) RealP |
| 4059 | return mem.spanZ(result_path); | 4059 | return mem.spanZ(result_path); |
| 4060 | } | 4060 | } |
| 4061 | | 4061 | |
| 4062 | /// Same as `realpath` except `pathname` is null-terminated and UTF16LE-encoded. | 4062 | /// Same as `realpath` except `pathname` is UTF16LE-encoded. |
| 4063 | /// TODO use ntdll for better semantics | 4063 | /// TODO use ntdll to emulate `GetFinalPathNameByHandleW` routine |
| 4064 | pub fn realpathW(pathname: []const u16, out_buffer: *[MAX_PATH_BYTES]u8) RealPathError![]u8 { | 4064 | pub fn realpathW(pathname: []const u16, out_buffer: *[MAX_PATH_BYTES]u8) RealPathError![]u8 { |
| 4065 | const w = windows; | 4065 | const w = windows; |
| 4066 | | 4066 | |